Skip to content

Commit

Permalink
upgrade AGP to 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredsburrows committed Jul 29, 2017
1 parent 5790b93 commit 9a26ca9
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 16 deletions.
15 changes: 14 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.android.build.gradle.internal.dsl.TestOptions
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
applyFrom(rootProject.file("gradle/versions.gradle.kts"))
Expand Down Expand Up @@ -98,6 +99,8 @@ android {
isCheckAllWarnings = true
isWarningsAsErrors = true
setLintConfig(rootProject.file("${project.rootDir}/config/lint/lint.xml"))
// TODO
disable("MissingRegistered")
}

// Add "debug.keystore" so developers can share APKs with same signatures locally
Expand Down Expand Up @@ -136,7 +139,7 @@ android {

testOptions {
animationsDisabled = true
unitTests(delegateClosureOf<TestOptions.UnitTestOptions>{
unitTests(delegateClosureOf<TestOptions.UnitTestOptions> {
setReturnDefaultValues(true)
all(KotlinClosure1<Any, Test>({
(this as Test).also { testTask ->
Expand Down Expand Up @@ -165,6 +168,9 @@ configurations.all {
resolutionStrategy.force(extra["kotlinStdlib"])
resolutionStrategy.force(extra["multidex"])
resolutionStrategy.force(extra["multidexInstrumentation"])
// TODO
resolutionStrategy.force("org.jacoco:org.jacoco.agent:0.7.4.201502262128")
resolutionStrategy.force("org.jacoco:org.jacoco.ant:0.7.4.201502262128")
}

dependencies {
Expand Down Expand Up @@ -209,3 +215,10 @@ dependencies {
testCompile(extra["equalsverifier"])
testCompile(extra["reflections"])
}

// TODO
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = rootProject.extra["targetCompatibilityVersion"] as String
}
}
62 changes: 53 additions & 9 deletions gradle/project-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,48 @@
"androidJacocoAgent",
"androidJacocoAnt",
"androidTestAnnotationProcessor",
"androidTestApi",
"androidTestApk",
"androidTestCompile",
"androidTestJackPlugin",
"androidTestCompileOnly",
"androidTestImplementation",
"androidTestProvided",
"androidTestRuntimeOnly",
"androidTestUtil",
"androidTestWearApp",
"annotationProcessor",
"api",
"apk",
"archives",
"checkstyle",
"compile",
"compileOnly",
"debugAndroidTestAnnotationProcessorClasspath",
"debugAndroidTestCompileClasspath",
"debugAndroidTestRuntimeClasspath",
"debugAnnotationProcessor",
"debugAnnotationProcessorClasspath",
"debugApi",
"debugApiElements",
"debugApk",
"debugCompile",
"debugJackPlugin",
"debugCompileClasspath",
"debugCompileOnly",
"debugImplementation",
"debugMetadataElements",
"debugProvided",
"debugRuntimeClasspath",
"debugRuntimeElements",
"debugRuntimeOnly",
"debugUnitTestAnnotationProcessorClasspath",
"debugUnitTestCompileClasspath",
"debugUnitTestRuntimeClasspath",
"debugWearApp",
"debugWearBundling",
"default",
"default-mapping",
"default-metadata",
"findbugs",
"findbugsPlugins",
"jackPlugin",
"implementation",
"jacocoAgent",
"jacocoAnt",
"kapt",
Expand All @@ -42,28 +62,51 @@
"pmd",
"provided",
"releaseAnnotationProcessor",
"releaseAnnotationProcessorClasspath",
"releaseApi",
"releaseApiElements",
"releaseApk",
"releaseCompile",
"releaseJackPlugin",
"releaseCompileClasspath",
"releaseCompileOnly",
"releaseImplementation",
"releaseMetadataElements",
"releaseProvided",
"releaseRuntimeClasspath",
"releaseRuntimeElements",
"releaseRuntimeOnly",
"releaseUnitTestAnnotationProcessorClasspath",
"releaseUnitTestCompileClasspath",
"releaseUnitTestRuntimeClasspath",
"releaseWearApp",
"releaseWearBundling",
"runtimeOnly",
"testAnnotationProcessor",
"testApi",
"testApk",
"testCompile",
"testCompileOnly",
"testDebugAnnotationProcessor",
"testDebugApi",
"testDebugApk",
"testDebugCompile",
"testDebugJackPlugin",
"testDebugCompileOnly",
"testDebugImplementation",
"testDebugProvided",
"testDebugRuntimeOnly",
"testDebugWearApp",
"testJackPlugin",
"testImplementation",
"testProvided",
"testReleaseAnnotationProcessor",
"testReleaseApi",
"testReleaseApk",
"testReleaseCompile",
"testReleaseJackPlugin",
"testReleaseCompileOnly",
"testReleaseImplementation",
"testReleaseProvided",
"testReleaseRuntimeOnly",
"testReleaseWearApp",
"testRuntimeOnly",
"testWearApp",
"wearApp"
],
Expand All @@ -72,6 +115,7 @@
"buildScan": "com.gradle.scan.plugin.internal.api.f",
"defaultArtifacts": "org.gradle.api.internal.plugins.DefaultArtifactPublicationSet",
"reporting": "org.gradle.api.reporting.ReportingExtension",
"buildOutputs": "org.gradle.api.NamedDomainObjectContainer<com.android.build.gradle.api.BaseVariantOutput>",
"android": "com.android.build.gradle.AppExtension",
"kotlin": "org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension",
"kapt": "org.jetbrains.kotlin.gradle.plugin.KaptExtension",
Expand Down
12 changes: 6 additions & 6 deletions gradle/versions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Common versions
val androidGradleVersion = "2.3.3"
val androidGradleVersion = "3.0.0-alpha8"
val kotlinVersion = "1.1.3-2"
val supportLibraryVersion = "26.0.0"
val daggerVersion = "2.11"
val okHttpVersion = "3.8.1"
val retrofitVersion = "2.3.0"
val espressoVersion = "2.2.2"
val espressoVersion = "2.2.2" // 3.0.0
val leakCanaryVersion = "1.5"
val multidexVersion = "1.0.2"

Expand All @@ -14,8 +14,8 @@ extra["minSdkVersion"] = 19
extra["targetSdkVersion"] = 26
extra["compileSdkVersion"] = 26
extra["buildToolsVersion"] = "26.0.1"
extra["sourceCompatibilityVersion"] = "1.7" // JavaVersion.VERSION_1_7
extra["targetCompatibilityVersion"] = "1.7" // JavaVersion.VERSION_1_7
extra["sourceCompatibilityVersion"] = "1.8" // JavaVersion.VERSION_1_7
extra["targetCompatibilityVersion"] = "1.8" // JavaVersion.VERSION_1_7
extra["debugKeystoreUser"] = "androiddebugkey"
extra["debugKeystorePass"] = "android"

Expand Down Expand Up @@ -70,13 +70,13 @@ extra["espressoCore"] = "com.android.support.test.espresso:espress
extra["espressoIntents"] = "com.android.support.test.espresso:espresso-intents:$espressoVersion"
extra["espressoContrib"] = "com.android.support.test.espresso:espresso-contrib:$espressoVersion"
extra["testingSupportLib"] = "com.android.support.test:testing-support-lib:0.1"
extra["runner"] = "com.android.support.test:runner:0.5"
extra["runner"] = "com.android.support.test:runner:0.5" // 1.0.0

// testCompile
extra["junit"] = "junit:junit:4.12"
extra["mockitoCore"] = "org.mockito:mockito-core:2.8.47"
extra["mockitoKotlin"] = "com.nhaarman:mockito-kotlin-kt1.1:1.5.0"
extra["assertjCore"] = "org.assertj:assertj-core:1.7.1"
extra["assertjCore"] = "org.assertj:assertj-core:3.0.0"
extra["equalsverifier"] = "nl.jqno.equalsverifier:equalsverifier:2.3.1"
extra["mockwebserver"] = "com.squareup.okhttp3:mockwebserver:$okHttpVersion"
extra["reflections"] = "org.reflections:reflections:0.9.11"

0 comments on commit 9a26ca9

Please sign in to comment.