jackmiras
06/26/2017, 3:43 PMbuildscript {
ext.kotlin_version = '1.1.3'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4'
}
}
allprojects {
repositories {
jcenter()
maven { url "<https://jitpack.io>" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
My app/build.gradle file:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'org.junit.platform.gradle.plugin'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.myappid"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), '<http://proguard-rules.pro|proguard-rules.pro>'
}
}
}
def retrofit_version = '2.3.0'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile "com.squareup.retrofit2:retrofit:${retrofit_version}"
compile "com.squareup.retrofit2:converter-jackson:${retrofit_version}"
compile 'com.squareup.okhttp3:logging-interceptor:3.8.1'
compile 'io.paperdb:paperdb:2.0'
compile 'com.mobsandgeeks:android-saripaar:2.0.3'
compile 'com.github.jackmiras:logger:1.2'
compile 'com.github.jackmiras:placeholderj:2.3.0'
}
When I try to sync those scripts I'm getting the following error:
Error:The 'java' plugin has been applied, but it is not compatible with the Android plugins.
Does anyone know how to solve this?