From 5dae9d90f9c770cc23f0d60be992c09cb9a63aaf Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Fri, 30 Jul 2021 13:28:15 -0500 Subject: [PATCH] build(deps): bump android gradle plugin to 7.0.0 - ignore bcprov via ignorelist, can remove w/AGP7.1+ https://issuetracker.google.com/issues/159151549#comment12 - Triple-T publisher needs a switch to their agp7.0 track - Obsolete versionCode/version/dexOptions removed (suggested by AGP migration task in Android Studio) - AGP 7+ requires JDK11 to run, retire JDK8 from development --- AnkiDroid/build.gradle | 6 +----- api/build.gradle | 2 -- build.gradle | 6 +++--- gradle.properties | 7 ++++++- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/AnkiDroid/build.gradle b/AnkiDroid/build.gradle index 634f895cae..700bdc8c75 100644 --- a/AnkiDroid/build.gradle +++ b/AnkiDroid/build.gradle @@ -1,6 +1,6 @@ plugins { // Gradle plugin portal - id 'com.github.triplet.play' version '3.5.0' + id 'com.github.triplet.play' version '3.5.0-agp7.0' } apply plugin: 'com.android.application' @@ -171,10 +171,6 @@ android { } } - dexOptions { - // Skip pre-dexing when running in a CI environment or when disabled via -Dpre-dex=false. - preDexLibraries = preDexEnabled && !ciBuild - } compileOptions { coreLibraryDesugaringEnabled true } diff --git a/api/build.gradle b/api/build.gradle index 2f74556578..0c317da8e3 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -18,8 +18,6 @@ android { minSdkVersion 14 //noinspection OldTargetApi targetSdkVersion 29 - versionCode 11030 // 4th digit: 1=alpha, 2=beta, 3=official - versionName version } buildTypes { release { diff --git a/build.gradle b/build.gradle index 90c83cf4c0..8aa0e4bb00 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:7.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath "app.brant:amazonappstorepublisher:0.1.0" @@ -35,11 +35,11 @@ allprojects { ext { jvmVersion = Jvm.current().javaVersion.majorVersion - if (jvmVersion != "8" && jvmVersion != "11" && jvmVersion != "14") { + if (jvmVersion != "11" && jvmVersion != "14") { println "\n\n\n" println "**************************************************************************************************************" println "\n\n\n" - println "ERROR: AnkiDroid builds with JVM LTS and current releases (currently major version 8, 11, or 14)." + println "ERROR: AnkiDroid builds with JVM 11 and 14" println " Incompatible major version detected: '" + jvmVersion + "'" println "\n\n\n" println "**************************************************************************************************************" diff --git a/gradle.properties b/gradle.properties index 7eaea5a9fa..7be452fdd4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,12 @@ org.gradle.jvmargs=-Xmx1536m android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true -android.jetifier.blacklist=bcprov + +# bcprov processing works, but generates a warning (which treat as an error) with AGP7 +# bcprov will be processed cleanly (and this may be removed) with AGP7.1+ +# https://issuetracker.google.com/issues/159151549#comment12 +android.jetifier.ignorelist=bcprov + # With de-coupled gradle sub-modules, they may run in parallel org.gradle.parallel=true