Migration to AGP 2.3.0
This commit is contained in:
committed by
Alexey Tsvetkov
parent
6e721c4cee
commit
a68f7d79f5
+2
-17
@@ -6,7 +6,7 @@ import org.junit.Test
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
||||||
class KotlinAndroidGradleCLIOnly : AbstractKotlinAndroidGradleTests(gradleVersion = "2.14.1", androidGradlePluginVersion = "1.5.+")
|
class KotlinAndroidGradleCLIOnly : AbstractKotlinAndroidGradleTests(gradleVersion = "3.3", androidGradlePluginVersion = "2.3.0")
|
||||||
|
|
||||||
class KotlinAndroidWithJackGradleCLIOnly : AbstractKotlinAndroidWithJackGradleTests(gradleVersion = "3.3", androidGradlePluginVersion = "2.3.+")
|
class KotlinAndroidWithJackGradleCLIOnly : AbstractKotlinAndroidWithJackGradleTests(gradleVersion = "3.3", androidGradlePluginVersion = "2.3.+")
|
||||||
|
|
||||||
@@ -114,8 +114,6 @@ fun getSomething() = 10
|
|||||||
fun testIncrementalBuildWithNoChanges() {
|
fun testIncrementalBuildWithNoChanges() {
|
||||||
val project = Project("AndroidIncrementalSingleModuleProject", gradleVersion)
|
val project = Project("AndroidIncrementalSingleModuleProject", gradleVersion)
|
||||||
val tasksToExecute = arrayOf(
|
val tasksToExecute = arrayOf(
|
||||||
":app:prepareComAndroidSupportAppcompatV72311Library",
|
|
||||||
":app:prepareComAndroidSupportSupportV42311Library",
|
|
||||||
":app:compileDebugKotlin",
|
":app:compileDebugKotlin",
|
||||||
":app:compileDebugJavaWithJavac"
|
":app:compileDebugJavaWithJavac"
|
||||||
)
|
)
|
||||||
@@ -148,25 +146,12 @@ fun getSomething() = 10
|
|||||||
// rebuilt because BuildConfig.java was regenerated (timestamp was changed)
|
// rebuilt because BuildConfig.java was regenerated (timestamp was changed)
|
||||||
val useBuildConfigJavaKt = project.projectDir.getFileByName("useBuildConfigJava.kt")
|
val useBuildConfigJavaKt = project.projectDir.getFileByName("useBuildConfigJava.kt")
|
||||||
|
|
||||||
val stringsXml = project.projectDir.getFileByName("strings.xml")
|
|
||||||
stringsXml.modify { """
|
|
||||||
<resources>
|
|
||||||
<string name="app_name">kotlin</string>
|
|
||||||
<string name="app_name1">kotlin1</string>
|
|
||||||
</resources>
|
|
||||||
""" }
|
|
||||||
// rebuilt because R.java changed
|
|
||||||
val homeActivityKt = project.projectDir.getFileByName("HomeActivity.kt")
|
|
||||||
val useRJavaActivity = project.projectDir.getFileByName("UseRJavaActivity.kt")
|
|
||||||
|
|
||||||
project.build(":app:assembleDebug", options = options) {
|
project.build(":app:assembleDebug", options = options) {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertCompiledKotlinSources(project.relativize(
|
assertCompiledKotlinSources(project.relativize(
|
||||||
androidModuleKt,
|
androidModuleKt,
|
||||||
baseApplicationKt,
|
baseApplicationKt,
|
||||||
useBuildConfigJavaKt,
|
useBuildConfigJavaKt
|
||||||
homeActivityKt,
|
|
||||||
useRJavaActivity
|
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ apply plugin: 'kotlin-android-extensions'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.dagger.kotlin"
|
applicationId "com.example.dagger.kotlin"
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ apply plugin: 'kotlin-android-extensions'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.dagger.kotlin"
|
applicationId "com.example.dagger.kotlin"
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ dependencies {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.icepick.kotlin"
|
applicationId "com.example.icepick.kotlin"
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ apply plugin: 'kotlin-android-extensions'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "foo"
|
applicationId "foo"
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.kapt"
|
applicationId "com.example.kapt"
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ dependencies {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 22
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs += 'src/main/java2'
|
main.java.srcDirs += 'src/main/java2'
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ dependencies {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 22
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 7
|
minSdkVersion 7
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 22
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.kotlin.srcDirs += 'root/kotlin'
|
main.kotlin.srcDirs += 'root/kotlin'
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ apply plugin: 'kotlin-kapt'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.example.kotlin.butterknife"
|
applicationId "org.example.kotlin.butterknife"
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ apply plugin: 'kotlin-android-extensions'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.dagger.kotlin"
|
applicationId "com.example.dagger.kotlin"
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ apply plugin: 'kotlin-kapt'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion '23.0.1'
|
buildToolsVersion '25.0.2'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ apply plugin: 'realm-android'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId 'io.realm.examples.kotlin'
|
applicationId 'io.realm.examples.kotlin'
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ apply plugin: 'kotlin-kapt'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.kt15001"
|
applicationId "com.example.kt15001"
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "25.0.2"
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.genclassesnotfound"
|
applicationId "com.example.genclassesnotfound"
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
|
|||||||
Reference in New Issue
Block a user