Hi,
I am sorry for being such a java/intelij/gradle/maven noob. I have a small java android project that I imported into Android Studio (from Eclipse). It compiled and ran OK.
Now I wanted to add kotlin to it. I followed the blogpost.
- I installed the Kotlin plugin
- created folder kotlin in main
- edited the 2 build.gradle files, one is inside app, another on the project level
project/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ‘org.jetbrains.kotlin:kotlin-gradle-plugin:0.6.1673’
classpath ‘org.jetbrains.kotlin:kotlin-gradle-plugin-core:0.6.1673’
classpath ‘com.android.tools.build:gradle:0.7.+’
}
}
allprojects {
repositories {
mavenCentral()
}
}
app/
apply plugin: ‘android’
apply plugin: ‘kotlin-android’
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib:0.6.1673'
compile 'com.android.support:support-v4:+'
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 10
targetSdkVersion 17
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
First I got errors about missing kotlin-gradle-plugin-core . I tried different versions or just 6+ but the error stayed the same. I added it amongst dependencies and I got to (hopefully) next problem:
/home/jimny/AndroidStudioProjects/CebelcaPOS/app/build.gradle
Which I have no idea about. Can anyone help me, I really like what Kotlin language offers and I am not totally inexperienced developer otherwise, but I had little contact with whole JVM stack.
Best regards,
Janko