Has anyone had any luck building Kotlin for Android with the new build system (Gradle)? This is the basic setup:
buildscript { repositories { mavenCentral() maven { url 'http://repository.jetbrains.com/all' } } dependencies { classpath 'com.android.tools.build:gradle:0.4' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:0.1-SNAPSHOT' } } apply plugin: "kotlin" apply plugin: 'android'
repositories {
mavenCentral()
maven {
url ‘http://repository.jetbrains.com/all’
}
}dependencies {
compile files(‘libs/android-support-v4.jar’)
compile ‘org.jetbrains.kotlin:kotlin-stdlib:0.1-SNAPSHOT’
}android {
compileSdkVersion 17
buildToolsVersion “17.0.0”defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}tasks.withType(com.android.build.gradle.tasks.PackageApplication) {
pkgTask -> pkgTask.jniDir new File(projectDir, ‘libs’)
}
}
This leads to the following error:
Gradle: A problem occurred configuring project ‘:MyApp’.
> Failed to notify project evaluation listener.
> The ‘java’ plugin has been applied, but it is not compatible with the Android plugins.
I’m just getting up to speed with Gradle, so I’m not exactly sure how one might work around this (or if it’s even possible)