O
O
Oleg Gamega2015-10-01 12:12:02
Android
Oleg Gamega, 2015-10-01 12:12:02

Why is the kotlin folder not generated?

Hello.
Actually, the question itself is not generated by the kotlin folder, yes it is possible without it, yes you can create it by hand ... but nevertheless, if I understand correctly, Android Studio itself should generate it.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:0.13.1514'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "gadfil.content.app"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'org.jetbrains.kotlin:kotlin-stdlib:0.13.1514'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
}

configure-kotlin-project.png
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Balaksha, 2015-10-01
@gadfi

because after the next release there was no need to separate sorts, now you can use the java folder for .kt files

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question