Gradle 9.1.0

commit_hash:f10ee2c0a5c8a565c07d639f42d4288b2647d870
This commit is contained in:
bacecek
2025-10-10 14:53:40 +03:00
parent 5617d76d8b
commit 151d899a2c
11 changed files with 126 additions and 143 deletions
+2 -1
View File
@@ -78,6 +78,7 @@ subprojects {
// Do not use parallel forks, because profit from parallel execution is eaten by Robolectric initialization in every test process
maxParallelForks = 1
maxHeapSize = "4g"
failOnNoDiscoveredTests = false
}
configurations.configureEach {
@@ -115,7 +116,7 @@ buildTimeTracker {
}
wrapper {
gradleVersion "8.13"
gradleVersion "9.1.0"
distributionType = Wrapper.DistributionType.ALL
distributionUrl "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
-2
View File
@@ -3,12 +3,10 @@ apply plugin: 'kotlin'
repositories {
mavenCentral()
google()
}
dependencies {
implementation gradleApi()
implementation("com.android.tools:r8:8.10.24")
implementation libs.kotlin.reflect
}
-8
View File
@@ -4,14 +4,6 @@ apply from: "${project.projectDir}/../publish-android.gradle"
android {
namespace 'com.yandex.div.states'
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/room/schemas".toString()]
}
}
}
}
dependencies {
+2 -2
View File
@@ -159,8 +159,8 @@ android.applicationVariants.configureEach { variant ->
if (!isPerf) {
outputFileName = divkitVersion.buildNumber != 0 ?
"${project.archivesBaseName}-v${versionName}-b${divkitVersion.buildNumber}-${variant.baseName}.apk" :
"${project.archivesBaseName}-v${versionName}-${variant.baseName}.apk"
"${project.base.archivesName.get()}-v${versionName}-b${divkitVersion.buildNumber}-${variant.baseName}.apk" :
"${project.base.archivesName.get()}-v${versionName}-${variant.baseName}.apk"
}
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
[versions]
agp = "8.8.2"
android-lint = "31.8.2" # agp + "23.0.0"
agp = "8.12.3"
android-lint = "31.12.3" # agp + "23.0.0"
androidsvg = "1.4"
buildTimeTracker = "5.0.1"
coil = "3.0.4"
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+4 -8
View File
@@ -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.
@@ -86,8 +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 -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || 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
@@ -115,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.
@@ -173,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" )
@@ -206,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.
+93 -94
View File
@@ -1,94 +1,93 @@
@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
@rem SPDX-License-Identifier: Apache-2.0
@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. 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
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
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 %*
: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
@rem SPDX-License-Identifier: Apache-2.0
@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. 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
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
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
@rem Execute Gradle
"%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
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
@@ -1,5 +1,6 @@
package com.yandex.test.screenshot
import com.android.build.api.variant.Variant
import com.yandex.test.screenshot.tasks.CompareScreenshotsTask
import com.yandex.test.screenshot.tasks.ValidateTestResultsTask
import com.yandex.test.util.android
@@ -10,42 +11,33 @@ import kotlin.io.path.Path
class ScreenshotTestPlugin : Plugin<Project> {
@Suppress("UnstableApiUsage")
override fun apply(project: Project) {
val extension = project.extensions.create(
ScreenshotTestPluginExtension.NAME,
ScreenshotTestPluginExtension::class.java
)
project.androidComponents.onVariants { variant ->
val variantName = variant.name.replaceFirstChar { it.uppercase() }
CompareScreenshotsTask.register(project, extension, variantName)
}
val validateTestResultsTask = ValidateTestResultsTask.register(project)
project.afterEvaluate {
val validateTestResultsTask = ValidateTestResultsTask.register(project)
if (extension.enabled.get()) {
project.androidComponents.onVariants { variant: Variant ->
val compareTask = CompareScreenshotsTask.register(project, variant, extension)
project.androidComponents.finalizeDsl {
project.tasks.matching {
it.name.startsWith("connected") && it.name.endsWith("AndroidTest")
it.name == variant.computeTaskName("connected", "androidTest")
}.configureEach { task ->
val additionalOutputs = task.outputs.files.single {
val path = it.toPath()
path.contains(Path("connected_android_test_additional_output"))
}
val variant = task.name.removePrefix("connected")
.removeSuffix("AndroidTest")
val compareScreenshotsTask =
project.tasks.withType(CompareScreenshotsTask::class.java)
.named("compare${variant}Screenshots")
.get()
compareScreenshotsTask.screenshotDir.set(additionalOutputs)
if (extension.enableComparison.get()) {
task.finalizedBy(compareScreenshotsTask)
compareTask.configure {
it.screenshotDir.set(additionalOutputs)
}
task.finalizedBy(validateTestResultsTask)
task.finalizedBy(
compareTask,
validateTestResultsTask,
)
}
}
}
@@ -1,5 +1,6 @@
package com.yandex.test.screenshot.tasks
import com.android.build.api.variant.Variant
import com.yandex.test.screenshot.ScreenshotTestPluginExtension
import com.yandex.test.util.FileOutput
import com.yandex.test.util.Logger
@@ -303,12 +304,16 @@ abstract class CompareScreenshotsTask : DefaultTask() {
private const val TAG = "CompareScreenshotsTask"
@Suppress("UnstableApiUsage")
fun register(
project: Project,
variant: Variant,
extension: ScreenshotTestPluginExtension,
variant: String,
): TaskProvider<CompareScreenshotsTask> =
project.tasks.register("compare${variant}Screenshots", CompareScreenshotsTask::class.java) {
): TaskProvider<CompareScreenshotsTask> =
project.tasks.register(
variant.computeTaskName(action = "compare", subject = "screenshots"),
CompareScreenshotsTask::class.java,
) {
it.referencesDir.set(project.file(extension.referencesDir))
it.comparableCategories.set(extension.comparableCategories)
it.strictComparison.set(extension.strictComparison)