diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2022-02-04 19:29:36 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 13:59:36 +0000 |
commit | 2b293e58056ea897c305bd39e21b42f5cd4d1a62 (patch) | |
tree | adde6c48d9f78d2aa70fe8867057cefe7bda27cd | |
parent | ce75d0e49b68e28aedd19293515d2a8fa56e2180 (diff) |
Port build to Gradle 7.4-rc-2 (#1707)
9 files changed, 15 insertions, 17 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8247be00..df8b281b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -20,8 +20,8 @@ crowdin { fun isSnapshot(): Boolean { with(project.providers) { - val workflow = environmentVariable("GITHUB_WORKFLOW").forUseAtConfigurationTime() - val snapshot = environmentVariable("SNAPSHOT").forUseAtConfigurationTime() + val workflow = environmentVariable("GITHUB_WORKFLOW") + val snapshot = environmentVariable("SNAPSHOT") return workflow.isPresent || snapshot.isPresent } } diff --git a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-application.gradle.kts b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-application.gradle.kts index 955ddaaa..c75ecf42 100644 --- a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-application.gradle.kts +++ b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-application.gradle.kts @@ -14,15 +14,14 @@ plugins { fun Project.isSnapshot(): Boolean { with(project.providers) { - val workflow = environmentVariable("GITHUB_WORKFLOW").forUseAtConfigurationTime() - val snapshot = environmentVariable("SNAPSHOT").forUseAtConfigurationTime() + val workflow = environmentVariable("GITHUB_WORKFLOW") + val snapshot = environmentVariable("SNAPSHOT") return workflow.isPresent || snapshot.isPresent } } android { - val minifySwitch = - project.providers.environmentVariable("DISABLE_MINIFY").forUseAtConfigurationTime() + val minifySwitch = project.providers.environmentVariable("DISABLE_MINIFY") adbOptions.installOptions("--user 0") diff --git a/build-logic/android-plugins/src/main/kotlin/flavors/SlimTests.kt b/build-logic/android-plugins/src/main/kotlin/flavors/SlimTests.kt index ae14fdab..2b0cb8eb 100644 --- a/build-logic/android-plugins/src/main/kotlin/flavors/SlimTests.kt +++ b/build-logic/android-plugins/src/main/kotlin/flavors/SlimTests.kt @@ -20,7 +20,7 @@ import org.gradle.language.nativeplatform.internal.BuildType * variants in Android App and Library projects, and all tests in JVM projects. */ internal fun Project.configureSlimTests() { - if (providers.gradleProperty(SLIM_TESTS_PROPERTY).forUseAtConfigurationTime().isPresent) { + if (providers.gradleProperty(SLIM_TESTS_PROPERTY).isPresent) { // disable unit test tasks on the release build type for Android Library projects extensions.findByType<LibraryAndroidComponentsExtension>()?.run { beforeVariants(selector().withBuildType(BuildType.RELEASE.name)) { diff --git a/build-logic/android-plugins/src/main/kotlin/signing/AppSigning.kt b/build-logic/android-plugins/src/main/kotlin/signing/AppSigning.kt index 3618b6a5..115f0f56 100644 --- a/build-logic/android-plugins/src/main/kotlin/signing/AppSigning.kt +++ b/build-logic/android-plugins/src/main/kotlin/signing/AppSigning.kt @@ -19,7 +19,7 @@ internal fun Project.configureBuildSigning() { val keystoreConfigFile = rootProject.layout.projectDirectory.file(KEYSTORE_CONFIG_PATH) if (keystoreConfigFile.asFile.exists()) { extensions.configure<BaseAppModuleExtension> { - val contents = providers.fileContents(keystoreConfigFile).asText.forUseAtConfigurationTime() + val contents = providers.fileContents(keystoreConfigFile).asText val keystoreProperties = Properties() keystoreProperties.load(contents.get().byteInputStream()) signingConfigs { diff --git a/build-logic/android-plugins/src/main/kotlin/versioning/VersioningPlugin.kt b/build-logic/android-plugins/src/main/kotlin/versioning/VersioningPlugin.kt index 671e9e5b..3083921f 100644 --- a/build-logic/android-plugins/src/main/kotlin/versioning/VersioningPlugin.kt +++ b/build-logic/android-plugins/src/main/kotlin/versioning/VersioningPlugin.kt @@ -53,7 +53,7 @@ class VersioningPlugin : Plugin<Project> { require(propFile.asFile.exists()) { "A 'version.properties' file must exist in the project subdirectory to use this plugin" } - val contents = providers.fileContents(propFile).asText.forUseAtConfigurationTime() + val contents = providers.fileContents(propFile).asText val versionProps = Properties().also { it.load(contents.get().byteInputStream()) } val versionName = requireNotNull(versionProps.getProperty(VERSIONING_PROP_VERSION_NAME)) { diff --git a/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.gradle.gradle.kts b/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.gradle.gradle.kts index abe0b65a..bbaa8505 100644 --- a/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.gradle.gradle.kts +++ b/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.gradle.gradle.kts @@ -7,6 +7,6 @@ import org.gradle.api.tasks.wrapper.Wrapper import org.gradle.kotlin.dsl.withType tasks.withType<Wrapper> { - gradleVersion = "7.3.3" - distributionSha256Sum = "b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302" + gradleVersion = "7.4-rc-2" + distributionSha256Sum = "21491c9f0656e1529ccb39cbd587d01c33ba00d25f994b10240748ed0d45894a" } diff --git a/build-logic/automation-plugins/src/main/kotlin/crowdin/CrowdinPlugin.kt b/build-logic/automation-plugins/src/main/kotlin/crowdin/CrowdinPlugin.kt index dc67c51b..38ca6700 100644 --- a/build-logic/automation-plugins/src/main/kotlin/crowdin/CrowdinPlugin.kt +++ b/build-logic/automation-plugins/src/main/kotlin/crowdin/CrowdinPlugin.kt @@ -28,7 +28,7 @@ class CrowdinDownloadPlugin : Plugin<Project> { override fun apply(project: Project) { with(project) { - val buildDirectory = layout.buildDirectory.asFile.forUseAtConfigurationTime().get() + val buildDirectory = layout.buildDirectory.asFile val extension = extensions.create<CrowdinExtension>("crowdin") afterEvaluate { val projectName = extension.projectName @@ -38,9 +38,8 @@ class CrowdinDownloadPlugin : Plugin<Project> { val buildOnApi = tasks.register("buildOnApi") { doLast { - val login = providers.environmentVariable("CROWDIN_LOGIN").forUseAtConfigurationTime() - val key = - providers.environmentVariable("CROWDIN_PROJECT_KEY").forUseAtConfigurationTime() + val login = providers.environmentVariable("CROWDIN_LOGIN") + val key = providers.environmentVariable("CROWDIN_PROJECT_KEY") if (!login.isPresent) { throw GradleException("CROWDIN_LOGIN environment variable must be set") } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar Binary files differindex 7454180f..41d9927a 100644 --- a/gradle/wrapper/gradle-wrapper.jar +++ b/gradle/wrapper/gradle-wrapper.jar diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 59250647..762b15f9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionSha256Sum=21491c9f0656e1529ccb39cbd587d01c33ba00d25f994b10240748ed0d45894a +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-rc-2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists |