Files
kotlin-fork/idea/testData/configuration/android-gradle/gradleExamples/gradleExample22_after.gradle
T
Juan Chen 7aa195b017 Use "implementation" in build scripts when configuring Kotlin (KT-22571)
Currently "compile" is used when adding kotlin dependencies to build
scripts, which is deprecated.
2018-11-29 16:23:23 +03:00

56 lines
1.4 KiB
Groovy
Vendored

buildscript {
ext.kotlin_version = '$VERSION$'
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'android'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 15
buildToolsVersion "17.0"
testBuildType = "staging"
defaultConfig {
buildConfig "private final static boolean DEFAULT = true;", \
"private final static String FOO = \"foo\";"
}
productFlavors {
f1 {
packageName = "com.android.tests.flavored.f1"
versionName = "1.0.0-f1"
buildConfig "private final static String FLAVOR = \"f1\";"
}
f2 {
packageName = "com.android.tests.flavored.f2"
versionName = "1.0.0-f2"
buildConfig "private final static String FLAVOR = \"f2\";"
}
}
buildTypes {
debug {
packageNameSuffix = ".debug"
versionNameSuffix = ".D"
buildConfig "private final static boolean DEBUG2 = false;"
}
staging {
packageNameSuffix = ".staging"
versionNameSuffix = ".S"
signingConfig signingConfigs.debug
}
}
}
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}