Upgrade to AGP 7.2.0 (#1920)

This commit is contained in:
Harsh Shandilya 2022-05-19 12:53:59 +05:30 committed by GitHub
parent 75d980e9eb
commit 37b80d5d19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 11 deletions

View file

@ -20,14 +20,6 @@ crowdin {
skipCleanup = false skipCleanup = false
} }
fun isSnapshot(): Boolean {
with(project.providers) {
val workflow = environmentVariable("GITHUB_WORKFLOW")
val snapshot = environmentVariable("SNAPSHOT")
return workflow.isPresent || snapshot.isPresent
}
}
android { android {
compileOptions { isCoreLibraryDesugaringEnabled = true } compileOptions { isCoreLibraryDesugaringEnabled = true }
@ -96,7 +88,7 @@ dependencies {
implementation(libs.thirdparty.sshauth) implementation(libs.thirdparty.sshauth)
implementation(libs.thirdparty.sshj) implementation(libs.thirdparty.sshj)
if (isSnapshot()) { if (snapshot.snapshot) {
implementation(libs.thirdparty.whatthestack) implementation(libs.thirdparty.whatthestack)
} else { } else {
debugImplementation(libs.thirdparty.whatthestack) debugImplementation(libs.thirdparty.whatthestack)

View file

@ -7,6 +7,7 @@
import flavors.FlavorDimensions import flavors.FlavorDimensions
import flavors.ProductFlavors import flavors.ProductFlavors
import signing.configureBuildSigning import signing.configureBuildSigning
import snapshot.SnapshotExtension
plugins { plugins {
id("com.android.application") id("com.android.application")
@ -64,3 +65,8 @@ android {
project.configureBuildSigning() project.configureBuildSigning()
} }
dependencies {
extensions.add("snapshot", SnapshotExtension::class.java)
the<SnapshotExtension>().snapshot = isSnapshot()
}

View file

@ -0,0 +1,10 @@
/*
* Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package snapshot
abstract class SnapshotExtension {
abstract var snapshot: Boolean
}

View file

@ -39,13 +39,12 @@ androidx-swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.
aps-sublimeFuzzy = "com.github.android-password-store:sublime-fuzzy:2.1.0" aps-sublimeFuzzy = "com.github.android-password-store:sublime-fuzzy:2.1.0"
aps-zxingAndroidEmbedded = "com.github.android-password-store:zxing-android-embedded:4.2.1" aps-zxingAndroidEmbedded = "com.github.android-password-store:zxing-android-embedded:4.2.1"
build-agp = "com.android.tools.build:gradle:7.1.3" build-agp = "com.android.tools.build:gradle:7.2.0"
build-binarycompat = "org.jetbrains.kotlinx:binary-compatibility-validator:0.10.0" build-binarycompat = "org.jetbrains.kotlinx:binary-compatibility-validator:0.10.0"
build-download = "de.undercouch:gradle-download-task:5.1.0" build-download = "de.undercouch:gradle-download-task:5.1.0"
build-kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21" build-kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.19.0" build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.19.0"
build-okhttp = "com.squareup.okhttp3:okhttp:4.9.3" build-okhttp = "com.squareup.okhttp3:okhttp:4.9.3"
build-r8 = "com.android.tools:r8:3.3.28"
build-semver = "com.vdurmont:semver4j:3.1.0" build-semver = "com.vdurmont:semver4j:3.1.0"
build-sentry = "io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin:3.0.1" build-sentry = "io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin:3.0.1"
build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.6.1" build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.6.1"