diff --git a/annotation/compiler/build.gradle b/annotation/compiler/build.gradle index 7329c93608..d92b5b78ac 100644 --- a/annotation/compiler/build.gradle +++ b/annotation/compiler/build.gradle @@ -2,6 +2,11 @@ import proguard.gradle.ProGuardTask apply plugin: 'java' +java { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 +} + configurations { // adapted from https://android.googlesource.com/platform/frameworks/testing/+/976c423/espresso/espresso-lib/build.gradle // compileOnly dependencies will be repackaged, see rules in jarjar ant task below diff --git a/annotation/compiler/test/build.gradle b/annotation/compiler/test/build.gradle index d862ce572f..421f2c5796 100644 --- a/annotation/compiler/test/build.gradle +++ b/annotation/compiler/test/build.gradle @@ -37,8 +37,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } testOptions { diff --git a/benchmark/build.gradle b/benchmark/build.gradle index 65a8fb817f..d48b75a36a 100644 --- a/benchmark/build.gradle +++ b/benchmark/build.gradle @@ -7,11 +7,11 @@ android { namespace 'com.bumptech.glide.benchmark' compileSdkVersion libs.versions.compile.sdk.version.get() - buildToolsVersion "30.0.3" + buildToolsVersion "33.0.1" compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } defaultConfig { diff --git a/build.gradle b/build.gradle index 77064c167d..d2d5889865 100644 --- a/build.gradle +++ b/build.gradle @@ -72,15 +72,6 @@ subprojects { project -> gradlePluginPortal() } - afterEvaluate { - if (!project.plugins.hasPlugin("org.jetbrains.kotlin.jvm")) { - tasks.withType(JavaCompile) { - sourceCompatibility = 1.7 - targetCompatibility = 1.7 - } - } - } - // Exclude packages not intended for public use. if ([ "testutil", diff --git a/glide/build.gradle b/glide/build.gradle index ed2d27f754..3ee3c8ad32 100644 --- a/glide/build.gradle +++ b/glide/build.gradle @@ -151,7 +151,7 @@ jar { artifacts { archives releaseJavadocJar { - classifier 'javadoc' + archiveClassifier = 'javadoc' } } diff --git a/gradle.properties b/gradle.properties index 37794c20c6..3444b14b82 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,13 +12,6 @@ # org.gradle.parallel=true #Sun Jun 05 16:53:18 EST 2022 - -# upload.gradle manually generates the artifacts for each library, we don't appear to use -# these automatically generated components anyway. We may however be able to use the Android -# DSL to simplify our logic in the future though: -# https://developer.android.com/studio/publish-library/configure-pub-variants -android.disableAutomaticComponentCreation=true - ## Grouping GROUP=com.github.bumptech.glide diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa7..afba109285 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4e86b92707..c30b486a89 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f13..6689b85bee 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,92 +1,92 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/integration/avif/build.gradle b/integration/avif/build.gradle index ca795e3b9c..685f607a6d 100644 --- a/integration/avif/build.gradle +++ b/integration/avif/build.gradle @@ -20,8 +20,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/integration/concurrent/build.gradle b/integration/concurrent/build.gradle index 280ddacb5b..2e978dbc99 100644 --- a/integration/concurrent/build.gradle +++ b/integration/concurrent/build.gradle @@ -25,8 +25,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/integration/cronet/build.gradle b/integration/cronet/build.gradle index a33c65df5c..2cb7cef229 100644 --- a/integration/cronet/build.gradle +++ b/integration/cronet/build.gradle @@ -27,8 +27,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/integration/gifencoder/build.gradle b/integration/gifencoder/build.gradle index b31d416d99..d3d27a0a01 100644 --- a/integration/gifencoder/build.gradle +++ b/integration/gifencoder/build.gradle @@ -31,8 +31,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/integration/okhttp/build.gradle b/integration/okhttp/build.gradle index 15b1fa91d3..ec7b728f5f 100644 --- a/integration/okhttp/build.gradle +++ b/integration/okhttp/build.gradle @@ -20,8 +20,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/integration/okhttp3/build.gradle b/integration/okhttp3/build.gradle index 2c80d7a020..4c079f98a2 100644 --- a/integration/okhttp3/build.gradle +++ b/integration/okhttp3/build.gradle @@ -20,8 +20,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/integration/recyclerview/build.gradle b/integration/recyclerview/build.gradle index f5a2d4939f..a2984a63e3 100644 --- a/integration/recyclerview/build.gradle +++ b/integration/recyclerview/build.gradle @@ -18,8 +18,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/integration/volley/build.gradle b/integration/volley/build.gradle index 06bd1b7466..323deb2f53 100644 --- a/integration/volley/build.gradle +++ b/integration/volley/build.gradle @@ -29,8 +29,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/library/build.gradle b/library/build.gradle index d3c3df12e5..404072620c 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -70,8 +70,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/library/test/build.gradle b/library/test/build.gradle index baa1f700f5..8cc5a90add 100644 --- a/library/test/build.gradle +++ b/library/test/build.gradle @@ -29,7 +29,7 @@ afterEvaluate { android.testOptions.unitTests.all { Test testTask -> // configure max heap size of the test JVM testTask.maxHeapSize = TEST_JVM_MEMORY_SIZE as String - if (JavaVersion.current() <= JavaVersion.VERSION_1_7) { + if (JavaVersion.current() <= JavaVersion.VERSION_1_8) { // Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2048m; support was removed in 8.0 testTask.jvmArgs "-XX:MaxPermSize=${TEST_JVM_MEMORY_SIZE}" } diff --git a/mocks/build.gradle b/mocks/build.gradle index 92be3ffd96..52f4a64b1b 100644 --- a/mocks/build.gradle +++ b/mocks/build.gradle @@ -19,8 +19,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/renovate.json b/renovate.json index 3e936818e8..1e9c604775 100644 --- a/renovate.json +++ b/renovate.json @@ -12,14 +12,6 @@ { "matchPackageNames": ["androidx.fragment:fragment"], "allowedVersions": "1.3.6" - }, - { - "matchPackageNames": ["androidx.annotation:annotation"], - "allowedVersions": "<1.6.0" - }, - { - "matchPackageNames": ["androidx.appcompat:appcompat"], - "allowedVersions": "<1.4.0" } ] } diff --git a/samples/contacturi/build.gradle b/samples/contacturi/build.gradle index 88574ad4d5..189807df1e 100644 --- a/samples/contacturi/build.gradle +++ b/samples/contacturi/build.gradle @@ -19,8 +19,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/samples/flickr/build.gradle b/samples/flickr/build.gradle index 5ae6ab1cd6..370ca12f6d 100644 --- a/samples/flickr/build.gradle +++ b/samples/flickr/build.gradle @@ -25,8 +25,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/samples/giphy/build.gradle b/samples/giphy/build.gradle index 1bd128298c..c30983a595 100644 --- a/samples/giphy/build.gradle +++ b/samples/giphy/build.gradle @@ -23,8 +23,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/samples/imgur/build.gradle b/samples/imgur/build.gradle index 2ae096994b..63a4a94e5c 100644 --- a/samples/imgur/build.gradle +++ b/samples/imgur/build.gradle @@ -13,8 +13,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } buildTypes { release { diff --git a/samples/svg/build.gradle b/samples/svg/build.gradle index 2b59bb4e98..52d2cabdbc 100644 --- a/samples/svg/build.gradle +++ b/samples/svg/build.gradle @@ -20,8 +20,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } diff --git a/settings.gradle b/settings.gradle index 04f3bc9cae..e56723c234 100644 --- a/settings.gradle +++ b/settings.gradle @@ -71,15 +71,11 @@ dependencyResolutionManagement { library('androidx-multidex', "androidx.multidex:multidex:2.0.1") library('autoservice', 'com.google.auto.service:auto-service:1.0-rc3') library('autoservice.annotations', 'com.google.auto.service:auto-service-annotations:1.0.1') - library('android-gradle', 'com.android.tools.build:gradle:7.3.0') + library('android-gradle', 'com.android.tools.build:gradle:8.1.0') library('androidx-cardview', 'androidx.cardview:cardview:1.0.0') library('androidx-core', 'androidx.core:core:1.6.0') - // 1.6.0 seems to introduce: - // The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle - // in the samples. - library('androidx-annotation', 'androidx.annotation:annotation:1.5.0') - // 1.4+ requires java8. - library('androidx-appcompat', 'androidx.appcompat:appcompat:1.3.1') + library('androidx-annotation', 'androidx.annotation:annotation:1.6.0') + library('androidx-appcompat', 'androidx.appcompat:appcompat:1.4.0') library('androidx-benchmark.gradle', 'androidx.benchmark', 'benchmark-gradle-plugin').versionRef('androidx-benchmark') library('androidx-benchmark.junit', 'androidx.benchmark', 'benchmark-junit4').versionRef('androidx-benchmark') library('androidx-core.ktx', 'androidx.core:core-ktx:1.8.0') diff --git a/third_party/disklrucache/build.gradle b/third_party/disklrucache/build.gradle index 1fef6b67b0..e9190b2803 100644 --- a/third_party/disklrucache/build.gradle +++ b/third_party/disklrucache/build.gradle @@ -22,8 +22,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } }