diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2bf7eaa9..a4b4ce55 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: 23 + java-version: 25 - uses: actions/cache@v4 id: avd-cache diff --git a/.github/workflows/manually.yml b/.github/workflows/manually.yml index 3a99f089..72fdac08 100644 --- a/.github/workflows/manually.yml +++ b/.github/workflows/manually.yml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: 23 + java-version: 25 - uses: gradle/actions/setup-gradle@v4 diff --git a/test-fixture/app/build.gradle b/test-fixture/app/build.gradle deleted file mode 100644 index 70f49e35..00000000 --- a/test-fixture/app/build.gradle +++ /dev/null @@ -1,36 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - namespace = "com.example.testapp" - - compileSdkVersion 35 - buildToolsVersion "35.0.0" - - defaultConfig { - applicationId "com.example.testapp" - minSdkVersion 21 - targetSdkVersion 35 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { - compilerOptions { - jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11 - } -} - -dependencies { - implementation 'androidx.appcompat:appcompat:1.7.0' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' -} diff --git a/test-fixture/app/build.gradle.kts b/test-fixture/app/build.gradle.kts new file mode 100644 index 00000000..bcb05e3f --- /dev/null +++ b/test-fixture/app/build.gradle.kts @@ -0,0 +1,36 @@ +plugins { + id("com.android.application") +} + +android { + namespace = "com.example.testapp" + compileSdk = 36 + buildToolsVersion = "36.0.0" + + defaultConfig { + applicationId = "com.example.testapp" + minSdk = 23 + targetSdk = 36 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } +} + +tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) + } +} + +dependencies { + implementation("androidx.appcompat:appcompat:1.7.1") + androidTestImplementation("androidx.test.ext:junit:1.3.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0") +} diff --git a/test-fixture/build.gradle b/test-fixture/build.gradle deleted file mode 100644 index aaea38ec..00000000 --- a/test-fixture/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.7.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20" - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/test-fixture/build.gradle.kts b/test-fixture/build.gradle.kts new file mode 100644 index 00000000..f46a7256 --- /dev/null +++ b/test-fixture/build.gradle.kts @@ -0,0 +1,5 @@ +plugins { + id("com.android.application") version "9.1.0" apply false + id("org.jetbrains.kotlin.android") version "2.3.10" apply false +} + diff --git a/test-fixture/gradle.properties b/test-fixture/gradle.properties index 4d856208..3ee3597c 100644 --- a/test-fixture/gradle.properties +++ b/test-fixture/gradle.properties @@ -5,5 +5,3 @@ org.gradle.caching=true # Kotlin code style kotlin.code.style=official -# Enable AndroidX -android.useAndroidX=true diff --git a/test-fixture/gradle/wrapper/gradle-wrapper.jar b/test-fixture/gradle/wrapper/gradle-wrapper.jar index d64cd491..d997cfc6 100644 Binary files a/test-fixture/gradle/wrapper/gradle-wrapper.jar and b/test-fixture/gradle/wrapper/gradle-wrapper.jar differ diff --git a/test-fixture/gradle/wrapper/gradle-wrapper.properties b/test-fixture/gradle/wrapper/gradle-wrapper.properties index df97d72b..dbc3ce4a 100644 --- a/test-fixture/gradle/wrapper/gradle-wrapper.properties +++ b/test-fixture/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/test-fixture/gradlew b/test-fixture/gradlew index 1aa94a42..0262dcbd 100755 --- a/test-fixture/gradlew +++ b/test-fixture/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -112,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -170,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -203,15 +203,14 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/test-fixture/gradlew.bat b/test-fixture/gradlew.bat index 6689b85b..e509b2dd 100644 --- a/test-fixture/gradlew.bat +++ b/test-fixture/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ 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. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,22 +59,21 @@ 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. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 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 %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/test-fixture/settings.gradle b/test-fixture/settings.gradle deleted file mode 100644 index d7ce1632..00000000 --- a/test-fixture/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name='Test Project' -include ':app' diff --git a/test-fixture/settings.gradle.kts b/test-fixture/settings.gradle.kts new file mode 100644 index 00000000..c39db6c9 --- /dev/null +++ b/test-fixture/settings.gradle.kts @@ -0,0 +1,28 @@ +pluginManagement { + repositories { + google { + content { + includeGroupByRegex("androidx.*") + includeGroupByRegex("com.android.*") + includeGroupByRegex("com.google.*") + } + } + mavenCentral() + } +} + +rootProject.name = "Test Project" +include(":app") + +dependencyResolutionManagement { + repositories { + google { + content { + includeGroupByRegex("androidx.*") + includeGroupByRegex("com.android.*") + includeGroupByRegex("com.google.*") + } + } + mavenCentral() + } +}