feat: update dependencies, improve build
- New zip-android version fixes an issue on Android 7/8 devices - Enable Gradle configuration cache
This commit is contained in:
parent
04260ddfd6
commit
464835754e
10 changed files with 41 additions and 51 deletions
|
|
@ -1,5 +1,8 @@
|
|||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
|
|
@ -121,20 +124,6 @@ android {
|
|||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
val reportsDir = layout.buildDirectory.asFile.get()
|
||||
.resolve("reports").absolutePath
|
||||
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs += listOf(
|
||||
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
|
||||
"-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
|
||||
"-P", "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${reportsDir}",
|
||||
)
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
compose = true
|
||||
|
|
@ -148,7 +137,21 @@ android {
|
|||
kotlin {
|
||||
sourceSets.all {
|
||||
languageSettings.enableLanguageFeature("ExplicitBackingFields")
|
||||
languageSettings.enableLanguageFeature("WhenGuards")
|
||||
}
|
||||
compilerOptions {
|
||||
val reportsDir = layout.buildDirectory.asFile.get()
|
||||
.resolve("reports").absolutePath
|
||||
|
||||
jvmTarget = JvmTarget.JVM_1_8
|
||||
freeCompilerArgs.addAll(
|
||||
"-opt-in=kotlin.time.ExperimentalTime",
|
||||
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
|
||||
"-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
|
||||
"-P", "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${reportsDir}",
|
||||
"-XXLanguage:+PropertyParamAnnotationDefaultTargetMode", // @StringRes in field parameters of a class warning
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +173,6 @@ dependencies {
|
|||
debugImplementation(libs.compose.ui.tooling)
|
||||
debugImplementation(libs.compose.runtime.tracing)
|
||||
|
||||
implementation(libs.kotlinx.datetime)
|
||||
implementation(libs.kotlinx.immutable)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
|
||||
|
|
@ -184,10 +186,9 @@ dependencies {
|
|||
implementation(libs.baksmali)
|
||||
implementation(libs.compose.pipette)
|
||||
implementation(libs.compose.shimmer)
|
||||
implementation(variantOf(libs.zip) { artifactType("aar") })
|
||||
implementation(libs.zip)
|
||||
|
||||
@Suppress("UseTomlInstead")
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
||||
coreLibraryDesugaring(libs.desugaring)
|
||||
}
|
||||
|
||||
fun ProviderFactory.execIgnoreCode(vararg command: String): String = run {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import com.aliucord.manager.BuildConfig
|
|||
import com.aliucord.manager.ui.screens.patchopts.PatchOptions
|
||||
import com.aliucord.manager.util.IS_PROBABLY_EMULATOR
|
||||
import com.aliucord.manager.util.isPlayProtectEnabled
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.serialization.ExperimentalSerializationApi
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.Json
|
||||
|
|
@ -22,6 +21,7 @@ import java.text.SimpleDateFormat
|
|||
import java.util.Date
|
||||
import java.util.Locale
|
||||
import kotlin.time.Duration
|
||||
import kotlin.time.Instant
|
||||
|
||||
/**
|
||||
* Central manager for storing all attempted installations and
|
||||
|
|
|
|||
|
|
@ -22,10 +22,8 @@ import com.aliucord.manager.util.*
|
|||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.ImmutableMap
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
import java.util.UUID
|
||||
import kotlin.time.Duration
|
||||
import kotlin.time.*
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
[versions]
|
||||
accompanist = "0.37.3"
|
||||
agp = "8.10.1"
|
||||
agp = "8.11.0"
|
||||
androidx-activity = "1.10.1"
|
||||
androidx-core = "1.16.0"
|
||||
androidx-splashscreen = "1.0.1"
|
||||
androidx-lifecycle = "2.9.1"
|
||||
apksig = "8.10.1"
|
||||
apksig = "8.11.0"
|
||||
axml = "1.0.1"
|
||||
binary-resources = "2.0.1"
|
||||
bouncycastle = "1.81"
|
||||
|
|
@ -13,18 +13,18 @@ coil = "3.2.0"
|
|||
compose = "1.8.3"
|
||||
compose-material3 = "1.3.2"
|
||||
compose-pipette = "1.0.1"
|
||||
#diff = "4.12"
|
||||
desugaring = "2.1.5"
|
||||
diff = "4.16"
|
||||
koin = "4.1.0"
|
||||
kotlin = "2.1.21"
|
||||
kotlinx-datetime = "0.6.2"
|
||||
kotlin = "2.2.0"
|
||||
kotlinx-immutable = "0.4.0"
|
||||
kotlinx-serialization = "1.8.1"
|
||||
ktor = "3.2.0-eap-1351"
|
||||
kotlinx-serialization = "1.9.0"
|
||||
ktor = "3.2.1"
|
||||
microg = "0.3.6.244735"
|
||||
shimmer = "1.3.3"
|
||||
smali = "3.0.9"
|
||||
voyager = "1.1.0-beta03"
|
||||
zip = "2.2.0"
|
||||
zip = "2.3.0"
|
||||
|
||||
[libraries]
|
||||
# Accompanist
|
||||
|
|
@ -63,7 +63,6 @@ koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }
|
|||
koin-compose = { module = "io.insert-koin:koin-androidx-compose", version.ref = "koin" }
|
||||
|
||||
# KotlinX
|
||||
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
|
||||
kotlinx-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version.ref = "kotlinx-immutable" }
|
||||
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
|
||||
|
||||
|
|
@ -84,14 +83,14 @@ apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" }
|
|||
axml = { module = "com.aliucord:axml", version.ref = "axml" }
|
||||
binaryResources = { module = "com.aliucord:binary-resources", version.ref = "binary-resources" }
|
||||
bouncycastle = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bouncycastle" }
|
||||
#diff = { module = "io.github.java-diff-utils:java-diff-utils", version.ref = "diff" }
|
||||
diff = "com.github.Aliucord:java-diff-utils:a0002d1d40" # TODO: remove when https://github.com/java-diff-utils/java-diff-utils/pull/198 is released
|
||||
diff = { module = "io.github.java-diff-utils:java-diff-utils", version.ref = "diff" }
|
||||
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
||||
baksmali = { module = "com.android.tools.smali:smali-baksmali", version.ref = "smali" }
|
||||
zip = { module = "io.github.diamondminer88:zip-android", version.ref = "zip" } # Only use the "aar" artifact
|
||||
zip = { module = "io.github.diamondminer88:zip-android", version.ref = "zip" }
|
||||
|
||||
# Other
|
||||
microg = { module = "org.microg.gms:play-services-safetynet", version.ref = "microg" }
|
||||
desugaring = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugaring" }
|
||||
|
||||
[bundles]
|
||||
accompanist = [
|
||||
|
|
|
|||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
|||
6
gradlew
vendored
6
gradlew
vendored
|
|
@ -114,7 +114,7 @@ case "$( uname )" in #(
|
|||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
|
|
@ -205,7 +205,7 @@ 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.
|
||||
|
|
@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||
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.
|
||||
|
|
|
|||
4
gradlew.bat
vendored
4
gradlew.bat
vendored
|
|
@ -70,11 +70,11 @@ goto fail
|
|||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@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%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
|
|
|||
|
|
@ -17,14 +17,6 @@ dependencyResolutionManagement {
|
|||
name = "aliucord"
|
||||
url = uri("https://maven.aliucord.com/snapshots")
|
||||
}
|
||||
maven { // TODO: remove, refer to libs.versions.toml
|
||||
name = "jitpack"
|
||||
url = uri("https://jitpack.io")
|
||||
}
|
||||
maven { // TODO: remove when Ktor 3.2.1 released
|
||||
name = "ktor-eap"
|
||||
url = uri("https://maven.pkg.jetbrains.space/public/p/ktor/eap")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue