diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index c0a3d55ce..1d9aa0069 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: submodules: recursive fetch-depth: 0 @@ -42,7 +42,7 @@ jobs: java-version: 21 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v5 + uses: gradle/actions/setup-gradle@v6 - name: Configure Gradle properties run: | @@ -57,7 +57,7 @@ jobs: version: 1.12.1 - name: Setup ccache - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: | ~/.ccache @@ -67,7 +67,7 @@ jobs: ${{ runner.os }}-ccache- - name: Setup Android SDK - uses: android-actions/setup-android@v3 + uses: android-actions/setup-android@v4 - name: Remove Android's cmake shell: bash @@ -87,19 +87,19 @@ jobs: unzip zygisk/release/Vector-v*-Debug.zip -d Vector-Debug - name: Upload zygisk release - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: ${{ steps.prepareArtifact.outputs.zygiskReleaseName }} path: "./Vector-Release/*" - name: Upload zygisk debug - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: ${{ steps.prepareArtifact.outputs.zygiskDebugName }} path: "./Vector-Debug/*" - name: Upload mappings - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: mappings path: | @@ -107,7 +107,7 @@ jobs: app/build/outputs/mapping - name: Upload symbols - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: symbols path: build/symbols diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b883c23b7..f87d5a96f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -22,8 +22,6 @@ import java.time.Instant plugins { alias(libs.plugins.agp.app) alias(libs.plugins.nav.safeargs) - alias(libs.plugins.autoresconfig) - alias(libs.plugins.materialthemebuilder) alias(libs.plugins.lsplugin.apksign) } @@ -72,48 +70,54 @@ android { namespace = defaultManagerPackageName } -autoResConfig { - generateClass = true - generateRes = false - generatedClassFullName = "org.lsposed.manager.util.LangList" - generatedArrayFirstItem = "SYSTEM" -} +// Generate the translated-locale list and the Material accent-color theme overlays at build time +// from the inputs below. Task implementations live in buildSrc. +androidComponents { + onVariants { variant -> + val capped = variant.name.replaceFirstChar { it.uppercase() } + + val langList = + tasks.register("generate${capped}LangList") { + resDirs.from("src/main/res") + packageName = "org.lsposed.manager.util" + className = "LangList" + firstItem = "SYSTEM" + } + variant.sources.java?.addGeneratedSourceDirectory(langList, GenerateLangListTask::outputDir) -materialThemeBuilder { - themes { - for ((name, color) in - listOf( - "Red" to "F44336", - "Pink" to "E91E63", - "Purple" to "9C27B0", - "DeepPurple" to "673AB7", - "Indigo" to "3F51B5", - "Blue" to "2196F3", - "LightBlue" to "03A9F4", - "Cyan" to "00BCD4", - "Teal" to "009688", - "Green" to "4FAF50", - "LightGreen" to "8BC3A4", - "Lime" to "CDDC39", - "Yellow" to "FFEB3B", - "Amber" to "FFC107", - "Orange" to "FF9800", - "DeepOrange" to "FF5722", - "Brown" to "795548", - "BlueGrey" to "607D8F", - "Sakura" to "FF9CA8", - )) { - create("Material$name") { + val materialTheme = + tasks.register("generate${capped}MaterialTheme") { + generatePalette = true lightThemeFormat = "ThemeOverlay.Light.%s" darkThemeFormat = "ThemeOverlay.Dark.%s" - primaryColor = "#$color" + seedColors = + mapOf( + "Red" to "F44336", + "Pink" to "E91E63", + "Purple" to "9C27B0", + "DeepPurple" to "673AB7", + "Indigo" to "3F51B5", + "Blue" to "2196F3", + "LightBlue" to "03A9F4", + "Cyan" to "00BCD4", + "Teal" to "009688", + "Green" to "4FAF50", + "LightGreen" to "8BC3A4", + "Lime" to "CDDC39", + "Yellow" to "FFEB3B", + "Amber" to "FFC107", + "Orange" to "FF9800", + "DeepOrange" to "FF5722", + "Brown" to "795548", + "BlueGrey" to "607D8F", + "Sakura" to "FF9CA8", + ) } - } + variant.sources.res?.addGeneratedSourceDirectory( + materialTheme, + GenerateMaterialThemeTask::outputDir, + ) } - // Add Material Design 3 color tokens (such as palettePrimary100) in generated theme - // rikka.material:material >= 2.0.0 provides such attributes - // Enable this if your are using rikka.material:material - generatePalette = true } dependencies { diff --git a/build.gradle.kts b/build.gradle.kts index 0b078cd04..290706f9c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,6 @@ import org.gradle.process.ExecOperations plugins { alias(libs.plugins.agp.lib) apply false alias(libs.plugins.agp.app) apply false - alias(libs.plugins.kotlin) apply false alias(libs.plugins.ktfmt) } @@ -21,12 +20,11 @@ abstract class GitCommitCountValueSource : ValueSource("format") { "*/build.gradle.kts", "hiddenapi/*/build.gradle.kts", "services/*-service/build.gradle.kts", + "buildSrc/src/main/kotlin/**/*.kt", ) + // The daemon subproject is stuck on ktfmt's default (Meta) style instead of the + // kotlinLangStyle() applied everywhere else — the wrong style was set for it, but a + // bulk reformat would wreck git blame across the module, so it is kept as-is. Exclude + // its build script here so this task's kotlinLangStyle sweep does not fight + // :daemon:ktfmtFormat, which formats the daemon (scripts included) in Meta style. + exclude("daemon/**") dependsOn(":daemon:ktfmtFormat") dependsOn(":xposed:ktfmtFormat") dependsOn(":zygisk:ktfmtFormat") diff --git a/buildSrc/README.md b/buildSrc/README.md new file mode 100644 index 000000000..925230339 --- /dev/null +++ b/buildSrc/README.md @@ -0,0 +1,57 @@ +# Vector Build Logic + +The `buildSrc` project holds build logic that Gradle compiles before configuring the main build. It currently contains two source generators consumed by the `:app` (manager) module. Both produce data that the manager references at compile time, so they participate in every application build rather than running as a manual pre-step. + +The manager exposes two user-facing settings that require precomputed, per-build data: an in-app language selector and an accent-color selector. The language selector needs the concrete set of locales the application ships translations for, and the color selector needs a full Material 3 palette for each preset seed color. These generators derive that data from the resource tree and a fixed color table, so the settings stay consistent with the translations and palette definitions actually present in the source. + +## Directory Structure + +```text +buildSrc/ +├── build.gradle.kts # kotlin-dsl module; declares the color-generation library +└── src/main/kotlin/ + ├── GenerateLangListTask.kt # translated-locale enumeration + └── GenerateMaterialThemeTask.kt # accent-color theme overlays +``` + +## Integration + +The task classes live in the default package and are therefore visible to the module build scripts without an import. The `:app` build registers them per variant through the AGP variant API: + +```kotlin +androidComponents { + onVariants { variant -> + val langList = tasks.register("generate${cap}LangList") { … } + variant.sources.java?.addGeneratedSourceDirectory(langList, GenerateLangListTask::outputDir) + + val theme = tasks.register("generate${cap}MaterialTheme") { … } + variant.sources.res?.addGeneratedSourceDirectory(theme, GenerateMaterialThemeTask::outputDir) + } +} +``` + +`addGeneratedSourceDirectory` binds each task's `outputDir` into the variant's Java or resource source set. AGP owns the output location, wires the task into the source-merge graph, and establishes the task dependency automatically, so the generated Java is compiled and the generated resources are merged like any hand-written source. + +## Locale List Generation + +`GenerateLangListTask` emits the `org.lsposed.manager.util.LangList` class, which the settings screen reads to populate the language dropdown (`LangList.LOCALES` for entry values, `LangList.DISPLAY_LOCALES` for the script-qualified display keys). + +Inputs are the resource directories to scan (`resDirs`), the target `packageName` and `className`, and the leading `firstItem` (`SYSTEM`). The task: + +* Collects every `values-` folder that contains a `strings.xml`, treating the qualifier as a translated locale and ignoring configuration-only qualifiers such as `values-night` or `values-v31`. +* Converts each Android qualifier to a BCP-47 tag: a `b+`-prefixed qualifier has its `+` separators replaced with `-`, and a trailing `-r` segment drops its `r` marker (`zh-rCN` becomes `zh-CN`, `pt-rBR` becomes `pt-BR`). +* Adds `en` for the default `values/` resources, sorts the tags, and prepends `firstItem`. +* Produces `DISPLAY_LOCALES` as a parallel array in which the Simplified and Traditional Chinese tags are rewritten to their script forms (`zh-CN` to `zh-Hans`, `zh-TW` to `zh-Hant`); all other tags are identical to `LOCALES`. + +Adding a new translation is therefore a matter of dropping a `values-/strings.xml` folder into the module; the list updates on the next build with no manual edits. + +## Material Theme Generation + +`GenerateMaterialThemeTask` emits a resource `values.xml` containing the color roles and theme-overlay styles that back the accent-color options. The manager maps each preset to a generated style through `ThemeUtil` (for example `MATERIAL_RED` to `R.style.ThemeOverlay_MaterialRed`) and applies it to recolor the interface. + +Inputs are the seed color table (`seedColors`, mapping a theme name to a hex value), the `generatePalette` flag, and the `lightThemeFormat` / `darkThemeFormat` style-name templates. For each seed the task computes a Material 3 tonal palette (primary, secondary, tertiary, neutral, neutral-variant, and error ramps across the standard tone stops) and writes: + +* The resolved color roles for the light and dark schemes (`colorPrimary`, `colorOnPrimary`, `colorPrimaryContainer`, and the remaining container, surface, and outline roles). +* A `ThemeOverlay.Light.Material` and `ThemeOverlay.Dark.Material` style that binds those roles, plus the discrete palette attributes (`palettePrimary0` through `palettePrimary100`, and the equivalent ramps for the other tonal palettes) when `generatePalette` is set. + +The color science and XML serialization are provided by the `dev.rikka.tools.materialthemebuilder` artifact declared in `build.gradle.kts`. The task drives it directly: it instantiates a `MaterialThemeBuilderExtension` through the `ObjectFactory`, populates the theme container from `seedColors`, and invokes `ValuesAllGenerator`. Only the library classes are used; the artifact's Gradle plugin is not applied. Themes are keyed in a `NamedDomainObjectContainer`, so the output is ordered by theme name and is deterministic for a given seed table. diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 000000000..df91c774b --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { `kotlin-dsl` } + +repositories { + google() + mavenCentral() +} + +dependencies { + // Supplies the Material color science (HCT, tonal palettes) and XML generators used by + // GenerateMaterialThemeTask. Only the library classes are referenced; the plugin is not + // applied. + implementation("dev.rikka.tools.materialthemebuilder:gradle-plugin:1.5.1") +} diff --git a/buildSrc/src/main/kotlin/GenerateLangListTask.kt b/buildSrc/src/main/kotlin/GenerateLangListTask.kt new file mode 100644 index 000000000..0ca995f68 --- /dev/null +++ b/buildSrc/src/main/kotlin/GenerateLangListTask.kt @@ -0,0 +1,91 @@ +import java.io.File +import org.gradle.api.DefaultTask +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.InputFiles +import org.gradle.api.tasks.OutputDirectory +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity +import org.gradle.api.tasks.TaskAction + +/** + * Generates the `LangList` class enumerating the locales the app is translated into. + * + * Scans [resDirs] for `values-` folders containing a `strings.xml`, converts each + * Android locale qualifier to a BCP-47 tag (`zh-rCN` -> `zh-CN`, `pt-rBR` -> `pt-BR`), adds `en` + * for the default `values/` resources, sorts the result, and prepends [firstItem]. + * `DISPLAY_LOCALES` mirrors `LOCALES` with the script-qualified aliases the UI expects (`zh-CN` -> + * `zh-Hans`, `zh-TW` -> `zh-Hant`). + */ +abstract class GenerateLangListTask : DefaultTask() { + @get:InputFiles + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val resDirs: ConfigurableFileCollection + + @get:Input abstract val packageName: Property + + @get:Input abstract val className: Property + + @get:Input abstract val firstItem: Property + + @get:OutputDirectory abstract val outputDir: DirectoryProperty + + @TaskAction + fun generate() { + val tags = sortedSetOf() + tags.add("en") // the default `values/` resources are English + resDirs.files.forEach { res -> + (res.listFiles() ?: emptyArray()).forEach { dir -> + if ( + dir.isDirectory && + dir.name.startsWith("values-") && + File(dir, "strings.xml").exists() + ) { + tags.add(toBcp47(dir.name.removePrefix("values-"))) + } + } + } + + val locales = buildList { + add(firstItem.get()) + addAll(tags) + } + val display = locales.map { DISPLAY_ALIASES.getOrDefault(it, it) } + + val pkg = packageName.get() + val cls = className.get() + val out = outputDir.get().asFile.resolve(pkg.replace('.', '/')).resolve("$cls.java") + out.parentFile.mkdirs() + out.writeText( + buildString { + append("package ").append(pkg).append(";\n\n") + append("public final class ").append(cls).append(" {\n") + append(" public static final String[] LOCALES = {") + append(locales.joinToString(",") { "\"$it\"" }) + append("};\n") + append(" public static final String[] DISPLAY_LOCALES = {") + append(display.joinToString(",") { "\"$it\"" }) + append("};\n") + append("}\n") + } + ) + } + + /** Converts an Android resource locale qualifier to a BCP-47 language tag. */ + private fun toBcp47(qualifier: String): String { + if (qualifier.startsWith("b+")) return qualifier.substring(2).replace('+', '-') + // A `-r` segment carries a leading `r` marker to strip (e.g. `rCN` -> `CN`). + return qualifier + .split("-") + .mapIndexed { index, seg -> + if (index > 0 && seg.length == 3 && seg[0] == 'r') seg.substring(1) else seg + } + .joinToString("-") + } + + private companion object { + val DISPLAY_ALIASES = mapOf("zh-CN" to "zh-Hans", "zh-TW" to "zh-Hant") + } +} diff --git a/buildSrc/src/main/kotlin/GenerateMaterialThemeTask.kt b/buildSrc/src/main/kotlin/GenerateMaterialThemeTask.kt new file mode 100644 index 000000000..0ec8c1802 --- /dev/null +++ b/buildSrc/src/main/kotlin/GenerateMaterialThemeTask.kt @@ -0,0 +1,54 @@ +import dev.rikka.tools.materialthemebuilder.MaterialThemeBuilderExtension +import dev.rikka.tools.materialthemebuilder.generator.ValuesAllGenerator +import java.io.File +import javax.inject.Inject +import org.gradle.api.DefaultTask +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.model.ObjectFactory +import org.gradle.api.provider.MapProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.OutputDirectory +import org.gradle.api.tasks.TaskAction + +/** + * Generates the Material theme-overlay colors and styles that back the app's accent-color options. + * + * For each [seedColors] entry (theme name without the `Material` prefix mapped to a hex seed) it + * computes a Material 3 tonal palette and emits a `ThemeOverlay.Light/Dark.Material` style, + * named via [lightThemeFormat] / [darkThemeFormat]. The color math and XML writer are provided by + * the materialthemebuilder library through a [MaterialThemeBuilderExtension]. + */ +abstract class GenerateMaterialThemeTask @Inject constructor(private val objects: ObjectFactory) : + DefaultTask() { + @get:Input abstract val seedColors: MapProperty + + @get:Input abstract val generatePalette: Property + + @get:Input abstract val lightThemeFormat: Property + + @get:Input abstract val darkThemeFormat: Property + + @get:OutputDirectory abstract val outputDir: DirectoryProperty + + @TaskAction + fun generate() { + val extension = objects.newInstance(MaterialThemeBuilderExtension::class.java) + extension.isGeneratePalette = generatePalette.get() + val light = lightThemeFormat.get() + val dark = darkThemeFormat.get() + seedColors.get().toSortedMap().forEach { (name, color) -> + extension.themes.create("Material$name") { + primaryColor = "#$color" + lightThemeFormat = light + darkThemeFormat = dark + } + } + + val root = outputDir.get().asFile + // Wipe stale output so removed themes don't linger. + root.walkBottomUp().forEach { if (it != root) it.delete() } + val valuesDir = File(root, "values").apply { mkdirs() } + ValuesAllGenerator(File(valuesDir, "values.xml"), extension).generate() + } +} diff --git a/daemon/build.gradle.kts b/daemon/build.gradle.kts index 40b7e7b61..1b8ceda06 100644 --- a/daemon/build.gradle.kts +++ b/daemon/build.gradle.kts @@ -1,7 +1,15 @@ import com.android.build.api.dsl.ApplicationExtension import com.android.ide.common.signing.KeystoreHelper +import java.io.File import java.io.PrintStream import java.util.UUID +import org.gradle.api.DefaultTask +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Optional +import org.gradle.api.tasks.OutputDirectory +import org.gradle.api.tasks.TaskAction val defaultManagerPackageName: String by rootProject.extra val injectedPackageName: String by rootProject.extra @@ -11,7 +19,6 @@ val versionNameProvider: Provider by rootProject.extra plugins { alias(libs.plugins.agp.app) - alias(libs.plugins.kotlin) alias(libs.plugins.ktfmt) } @@ -47,53 +54,81 @@ android { namespace = "org.matrix.vector.daemon" } -android.applicationVariants.all { - val variantCapped = name.replaceFirstChar { it.uppercase() } - val variantLowered = name.lowercase() - - val outSrcDir = layout.buildDirectory.dir("generated/source/signInfo/${variantLowered}").get() - val signInfoTask = - tasks.register("generate${variantCapped}SignInfo") { - dependsOn(":app:validateSigning${variantCapped}") - val sign = - rootProject - .project(":app") - .extensions - .getByType(ApplicationExtension::class.java) - .buildTypes - .named(variantLowered) - .get() - .signingConfig - val outSrc = file("$outSrcDir/org/matrix/vector/daemon/utils/SignInfo.kt") - outputs.file(outSrc) - doLast { - outSrc.parentFile.mkdirs() - val certificateInfo = - KeystoreHelper.getCertificateInfo( - sign?.storeType, - sign?.storeFile, - sign?.storePassword, - sign?.keyPassword, - sign?.keyAlias, - ) - - PrintStream(outSrc) - .print( - """ - |package org.matrix.vector.daemon.utils - | - |object SignInfo { - | @JvmField - | val CERTIFICATE = byteArrayOf(${ - certificateInfo.certificate.encoded.joinToString(",") - }) - |}""" - .trimMargin()) +/** + * Generates a `SignInfo.kt` embedding the manager APK's signing certificate, used by the daemon to + * verify the manager's signature at runtime. + */ +abstract class GenerateSignInfoTask : DefaultTask() { + @get:Input @get:Optional abstract val storeType: Property + + @get:Input @get:Optional abstract val storeFilePath: Property + + @get:Input @get:Optional abstract val storePassword: Property + + @get:Input @get:Optional abstract val keyPassword: Property + + @get:Input @get:Optional abstract val keyAlias: Property + + @get:OutputDirectory abstract val outputDir: DirectoryProperty + + @TaskAction + fun generate() { + val outSrc = outputDir.get().file("org/matrix/vector/daemon/utils/SignInfo.kt").asFile + outSrc.parentFile.mkdirs() + val certificateInfo = + KeystoreHelper.getCertificateInfo( + storeType.orNull, + storeFilePath.orNull?.let { File(it) }, + storePassword.orNull, + keyPassword.orNull, + keyAlias.orNull, + ) + + PrintStream(outSrc) + .print( + """ + |package org.matrix.vector.daemon.utils + | + |object SignInfo { + | @JvmField + | val CERTIFICATE = byteArrayOf(${ + certificateInfo.certificate.encoded.joinToString(",") + }) + |}""" + .trimMargin() + ) + } +} + +androidComponents { + onVariants { variant -> + val variantCapped = variant.name.replaceFirstChar { it.uppercase() } + val variantLowered = variant.name.lowercase() + + val signInfoTask = + tasks.register("generate${variantCapped}SignInfo") { + dependsOn(":app:validateSigning${variantCapped}") + val sign = + rootProject + .project(":app") + .extensions + .getByType(ApplicationExtension::class.java) + .buildTypes + .named(variantLowered) + .get() + .signingConfig + storeType.set(sign?.storeType) + storeFilePath.set(sign?.storeFile?.absolutePath) + storePassword.set(sign?.storePassword) + keyPassword.set(sign?.keyPassword) + keyAlias.set(sign?.keyAlias) } - } - // registeoJavaGeneratingTask(signInfoTask, outSrcDir.asFile) - kotlin.sourceSets.getByName(variantLowered) { kotlin.srcDir(signInfoTask.map { outSrcDir }) } + variant.sources.kotlin?.addGeneratedSourceDirectory( + signInfoTask, + GenerateSignInfoTask::outputDir, + ) + } } dependencies { diff --git a/external/apache/commons-lang b/external/apache/commons-lang index 675ab08d0..fd12207b0 160000 --- a/external/apache/commons-lang +++ b/external/apache/commons-lang @@ -1 +1 @@ -Subproject commit 675ab08d0eb62b7d2edd43fe42512c896e84bcd6 +Subproject commit fd12207b0bf02b39098b413ee618a748fb3dd450 diff --git a/external/fmt b/external/fmt index 0e078f6ed..cdb8dc76d 160000 --- a/external/fmt +++ b/external/fmt @@ -1 +1 @@ -Subproject commit 0e078f6ed0624be8babc43bd145371d9f3a08aab +Subproject commit cdb8dc76d936a12aacc20b6d283d7c24ee4307fe diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 530c2248d..93d0272e1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,21 +1,19 @@ [versions] -agp = "8.13.1" -kotlin = "2.3.10" -nav = "2.9.7" +agp = "9.1.0" +kotlin = "2.3.21" +nav = "2.9.8" appcenter = "5.0.5" -glide = "5.0.5" -okhttp = "5.3.2" -ktfmt = "0.25.0" -coroutines = "1.10.2" +glide = "5.0.9" +okhttp = "5.4.0" +ktfmt = "0.26.0" +coroutines = "1.11.0" [plugins] agp-lib = { id = "com.android.library", version.ref = "agp" } agp-app = { id = "com.android.application", version.ref = "agp" } kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } nav-safeargs = { id = "androidx.navigation.safeargs", version.ref = "nav" } -autoresconfig = { id = "dev.rikka.tools.autoresconfig", version = "1.2.2" } ktfmt = { id = "com.ncorti.ktfmt.gradle", version.ref = "ktfmt" } -materialthemebuilder = { id = "dev.rikka.tools.materialthemebuilder", version = "1.5.1" } lsplugin-apksign = { id = "org.lsposed.lsplugin.apksign", version = "1.4" } [libraries] @@ -30,11 +28,11 @@ rikkax-recyclerview = { module = "dev.rikka.rikkax.recyclerview:recyclerview-ktx rikkax-widget-borderview = { module = "dev.rikka.rikkax.widget:borderview", version = "1.1.0" } rikkax-widget-mainswitchbar = { module = "dev.rikka.rikkax.widget:mainswitchbar", version = "1.0.2" } -androidx-activity = { module = "androidx.activity:activity", version = "1.12.4" } -androidx-annotation = { module = "androidx.annotation:annotation", version = "1.9.1" } -androidx-browser = { module = "androidx.browser:browser", version = "1.9.0" } +androidx-activity = { module = "androidx.activity:activity", version = "1.13.0" } +androidx-annotation = { module = "androidx.annotation:annotation", version = "1.10.0" } +androidx-browser = { module = "androidx.browser:browser", version = "1.10.0" } androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version = "2.2.1" } -androidx-core = { module = "androidx.core:core", version = "1.17.0" } +androidx-core = { module = "androidx.core:core", version = "1.18.0" } androidx-fragment = { module = "androidx.fragment:fragment", version = "1.8.9" } androidx-navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "nav" } androidx-navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "nav" } @@ -52,7 +50,7 @@ okhttp-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-i agp-apksig = { group = "com.android.tools.build", name = "apksig", version.ref = "agp" } appiconloader = { module = "me.zhanghai.android.appiconloader:appiconloader", version = "1.5.0" } material = { module = "com.google.android.material:material", version = "1.12.0" } -gson = { module = "com.google.code.gson:gson", version = "2.13.2" } +gson = { module = "com.google.code.gson:gson", version = "2.14.0" } hiddenapibypass = { module = "org.lsposed.hiddenapibypass:hiddenapibypass", version = "6.1" } kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 61285a659..b1b8ef56b 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37f78a6af..a9db11550 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,9 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index adff685a0..379a6582e 100755 --- a/gradlew +++ b/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob//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/. diff --git a/gradlew.bat b/gradlew.bat index c4bdd3ab8..a51ec4f58 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -19,12 +19,12 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @@ -51,7 +51,7 @@ 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 +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -65,29 +65,18 @@ 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 +"%COMSPEC%" /c exit 1 :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" %* +@rem Execute gradlew +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -: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 +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/xposed/build.gradle.kts b/xposed/build.gradle.kts index 8edcc5cc4..ef5cee53c 100644 --- a/xposed/build.gradle.kts +++ b/xposed/build.gradle.kts @@ -3,7 +3,6 @@ val versionNameProvider: Provider by rootProject.extra plugins { alias(libs.plugins.agp.lib) - alias(libs.plugins.kotlin) alias(libs.plugins.ktfmt) } diff --git a/zygisk/build.gradle.kts b/zygisk/build.gradle.kts index 1757ab170..3aff68787 100644 --- a/zygisk/build.gradle.kts +++ b/zygisk/build.gradle.kts @@ -4,7 +4,6 @@ import org.apache.tools.ant.filters.ReplaceTokens plugins { alias(libs.plugins.agp.app) - alias(libs.plugins.kotlin) alias(libs.plugins.ktfmt) }