mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-12-10 15:53:49 +08:00
chore: migrate to version catalog, Gropify
This commit is contained in:
1
.idea/inspectionProfiles/Project_Default.xml
generated
1
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -2,6 +2,7 @@
|
|||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<option name="myName" value="Project Default" />
|
<option name="myName" value="Project Default" />
|
||||||
<inspection_tool class="CheckImageSize" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="CheckImageSize" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="YAMLSchemaValidation" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="YAMLSchemaValidation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
</profile>
|
</profile>
|
||||||
</component>
|
</component>
|
||||||
@@ -1,29 +1,29 @@
|
|||||||
plugins {
|
plugins {
|
||||||
autowire(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
autowire(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
autowire(libs.plugins.kotlin.ksp)
|
alias(libs.plugins.kotlin.ksp)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = property.project.app.packageName
|
namespace = gropify.project.app.packageName
|
||||||
compileSdk = property.project.android.compileSdk
|
compileSdk = gropify.project.android.compileSdk
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
create("universal") {
|
create("universal") {
|
||||||
keyAlias = property.project.app.signing.keyAlias
|
keyAlias = gropify.project.app.signing.keyAlias
|
||||||
keyPassword = property.project.app.signing.keyPassword
|
keyPassword = gropify.project.app.signing.keyPassword
|
||||||
storeFile = rootProject.file(property.project.app.signing.storeFilePath)
|
storeFile = rootProject.file(gropify.project.app.signing.storeFilePath)
|
||||||
storePassword = property.project.app.signing.storePassword
|
storePassword = gropify.project.app.signing.storePassword
|
||||||
enableV1Signing = true
|
enableV1Signing = true
|
||||||
enableV2Signing = true
|
enableV2Signing = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = property.project.app.packageName
|
applicationId = gropify.project.app.packageName
|
||||||
minSdk = property.project.android.minSdk
|
minSdk = gropify.project.android.minSdk
|
||||||
targetSdk = property.project.android.targetSdk
|
targetSdk = gropify.project.android.targetSdk
|
||||||
versionName = property.project.app.versionName
|
versionName = gropify.project.app.versionName
|
||||||
versionCode = property.project.app.versionCode
|
versionCode = gropify.project.app.versionCode
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -50,40 +50,31 @@ androidComponents {
|
|||||||
onVariants(selector().all()) {
|
onVariants(selector().all()) {
|
||||||
it.outputs.forEach { output ->
|
it.outputs.forEach { output ->
|
||||||
val currentType = it.buildType
|
val currentType = it.buildType
|
||||||
|
val currentSuffix = gropify.github.ci.commit.id.let { suffix ->
|
||||||
// Workaround for GitHub Actions.
|
if (suffix.isNotBlank()) "-$suffix" else ""
|
||||||
// Why? I don't know, but it works.
|
|
||||||
// Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
|
|
||||||
// public inline fun CharSequence.isNotBlank(): Boolean defined in kotlin.text.
|
|
||||||
@Suppress("UNNECESSARY_SAFE_CALL", "RemoveRedundantCallsOfConversionMethods")
|
|
||||||
val currentSuffix = property.github.ci.commit.id?.let { suffix ->
|
|
||||||
// Workaround for GitHub Actions.
|
|
||||||
// Strongly transfer type to [String].
|
|
||||||
val sSuffix = suffix.toString()
|
|
||||||
if (sSuffix.isNotBlank()) "-$sSuffix" else ""
|
|
||||||
}
|
}
|
||||||
val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})"
|
val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})"
|
||||||
if (output is com.android.build.api.variant.impl.VariantOutputImpl)
|
if (output is com.android.build.api.variant.impl.VariantOutputImpl)
|
||||||
output.outputFileName.set("${property.project.name}-v$currentVersion-$currentType.apk")
|
output.outputFileName.set("${gropify.project.name}-v$currentVersion-$currentType.apk")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(de.robv.android.xposed.api)
|
compileOnly(libs.rovo89.xposed.api)
|
||||||
implementation(com.highcapable.yukihookapi.api)
|
implementation(libs.yukihookapi)
|
||||||
ksp(com.highcapable.yukihookapi.ksp.xposed)
|
ksp(libs.yukihookapi.ksp.xposed)
|
||||||
implementation(com.highcapable.kavaref.kavaref.core)
|
implementation(libs.kavaref.core)
|
||||||
implementation(com.highcapable.kavaref.kavaref.extension)
|
implementation(libs.kavaref.extension)
|
||||||
implementation(com.fankes.projectpromote.project.promote)
|
implementation(libs.project.promote)
|
||||||
implementation(com.github.topjohnwu.libsu.core)
|
implementation(libs.libsu)
|
||||||
implementation(com.github.duanhong169.drawabletoolbox)
|
implementation(libs.drawabletoolbox)
|
||||||
implementation(com.squareup.okhttp3.okhttp)
|
implementation(libs.okhttp)
|
||||||
implementation(androidx.core.core.ktx)
|
implementation(libs.androidx.core.ktx)
|
||||||
implementation(androidx.appcompat.appcompat)
|
implementation(libs.androidx.appcompat)
|
||||||
implementation(com.google.android.material.material)
|
implementation(libs.material)
|
||||||
implementation(androidx.constraintlayout.constraintlayout)
|
implementation(libs.androidx.constraintlayout)
|
||||||
testImplementation(junit.junit)
|
testImplementation(libs.junit)
|
||||||
androidTestImplementation(androidx.test.ext.junit)
|
androidTestImplementation(libs.androidx.test.ext.junit)
|
||||||
androidTestImplementation(androidx.test.espresso.espresso.core)
|
androidTestImplementation(libs.androidx.test.espresso.core)
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
autowire(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
autowire(libs.plugins.kotlin.android) apply false
|
alias(libs.plugins.kotlin.android) apply false
|
||||||
autowire(libs.plugins.kotlin.ksp) apply false
|
alias(libs.plugins.kotlin.ksp) apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
|||||||
42
gradle/libs.versions.toml
Normal file
42
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
[versions]
|
||||||
|
agp = "8.13.1"
|
||||||
|
kotlin = "2.2.21"
|
||||||
|
ksp = "2.2.21-2.0.4"
|
||||||
|
project-promote = "1.0.1"
|
||||||
|
rovo89-xposed-api = "82"
|
||||||
|
yukihookapi = "1.3.1"
|
||||||
|
kavaref-core = "1.0.2"
|
||||||
|
kavaref-extension = "1.0.1"
|
||||||
|
libsu = "5.2.2"
|
||||||
|
drawabletoolbox = "1.0.7"
|
||||||
|
okhttp = "5.3.0"
|
||||||
|
androidx-core-ktx = "1.17.0"
|
||||||
|
androidx-appcompat = "1.7.1"
|
||||||
|
material = "1.13.0"
|
||||||
|
androidx-constraintlayout = "2.2.1"
|
||||||
|
junit = "4.13.2"
|
||||||
|
androidx-test-junit = "1.3.0"
|
||||||
|
androidx-test-espresso-core = "3.7.0"
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
|
kotlin-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
project-promote = { group = "com.fankes.projectpromote", name = "project-promote", version.ref = "project-promote" }
|
||||||
|
rovo89-xposed-api = { group = "de.robv.android.xposed", name = "api", version.ref = "rovo89-xposed-api" }
|
||||||
|
yukihookapi = { group = "com.highcapable.yukihookapi", name = "api", version.ref = "yukihookapi" }
|
||||||
|
yukihookapi-ksp-xposed = { group = "com.highcapable.yukihookapi", name = "ksp-xposed", version.ref = "yukihookapi" }
|
||||||
|
kavaref-core = { group = "com.highcapable.kavaref", name = "kavaref-core", version.ref = "kavaref-core" }
|
||||||
|
kavaref-extension = { group = "com.highcapable.kavaref", name = "kavaref-extension", version.ref = "kavaref-extension" }
|
||||||
|
libsu = { group = "com.github.topjohnwu.libsu", name = "core", version.ref = "libsu" }
|
||||||
|
drawabletoolbox = { group = "com.github.duanhong169", name = "drawabletoolbox", version.ref = "drawabletoolbox" }
|
||||||
|
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
|
||||||
|
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-ktx" }
|
||||||
|
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
|
||||||
|
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||||
|
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
|
||||||
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
|
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-junit" }
|
||||||
|
androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-test-espresso-core" }
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
preferences:
|
|
||||||
autowire-on-sync-mode: UPDATE_OPTIONAL_DEPENDENCIES
|
|
||||||
repositories-mode: FAIL_ON_PROJECT_REPOS
|
|
||||||
|
|
||||||
repositories:
|
|
||||||
gradle-plugin-portal:
|
|
||||||
scope: PLUGINS
|
|
||||||
google:
|
|
||||||
maven-central:
|
|
||||||
jit-pack:
|
|
||||||
sonatype-oss-releases:
|
|
||||||
rovo89-xposed-api:
|
|
||||||
scope: LIBRARIES
|
|
||||||
url: https://api.xposed.info/
|
|
||||||
content:
|
|
||||||
include:
|
|
||||||
group:
|
|
||||||
de.robv.android.xposed
|
|
||||||
fankes-maven-releases:
|
|
||||||
url: https://raw.githubusercontent.com/fankes/maven-repository/main/repository/releases
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
com.android.application:
|
|
||||||
alias: android-application
|
|
||||||
version: 8.13.0
|
|
||||||
org.jetbrains.kotlin.android:
|
|
||||||
alias: kotlin-android
|
|
||||||
version: 2.2.20
|
|
||||||
com.google.devtools.ksp:
|
|
||||||
alias: kotlin-ksp
|
|
||||||
version: 2.2.20-2.0.3
|
|
||||||
|
|
||||||
libraries:
|
|
||||||
com.fankes.projectpromote:
|
|
||||||
project-promote:
|
|
||||||
version: 1.0.1
|
|
||||||
repositories:
|
|
||||||
fankes-maven-releases
|
|
||||||
de.robv.android.xposed:
|
|
||||||
api:
|
|
||||||
version: 82
|
|
||||||
repositories:
|
|
||||||
rovo89-xposed-api
|
|
||||||
com.highcapable.yukihookapi:
|
|
||||||
api:
|
|
||||||
version: 1.3.1
|
|
||||||
ksp-xposed:
|
|
||||||
version-ref: <this>::api
|
|
||||||
com.highcapable.kavaref:
|
|
||||||
kavaref-core:
|
|
||||||
version: 1.0.2
|
|
||||||
kavaref-extension:
|
|
||||||
version: 1.0.1
|
|
||||||
com.github.topjohnwu.libsu:
|
|
||||||
core:
|
|
||||||
version: 5.2.2
|
|
||||||
auto-update: false
|
|
||||||
com.github.duanhong169:
|
|
||||||
drawabletoolbox:
|
|
||||||
version: 1.0.7
|
|
||||||
com.squareup.okhttp3:
|
|
||||||
okhttp:
|
|
||||||
version: 5.1.0
|
|
||||||
androidx.core:
|
|
||||||
core-ktx:
|
|
||||||
version: 1.17.0
|
|
||||||
androidx.appcompat:
|
|
||||||
appcompat:
|
|
||||||
version: 1.7.1
|
|
||||||
com.google.android.material:
|
|
||||||
material:
|
|
||||||
version: 1.13.0
|
|
||||||
androidx.constraintlayout:
|
|
||||||
constraintlayout:
|
|
||||||
version: 2.2.1
|
|
||||||
androidx.test.ext:
|
|
||||||
junit:
|
|
||||||
version: 1.3.0
|
|
||||||
androidx.test.espresso:
|
|
||||||
espresso-core:
|
|
||||||
version: 3.7.0
|
|
||||||
junit:
|
|
||||||
junit:
|
|
||||||
version: 4.13.2
|
|
||||||
@@ -5,23 +5,36 @@ pluginManagement {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugins {
|
dependencyResolutionManagement {
|
||||||
id("com.highcapable.sweetdependency") version "1.0.4"
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
id("com.highcapable.sweetproperty") version "1.0.8"
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
maven("https://jitpack.io")
|
||||||
|
maven("https://api.xposed.info/")
|
||||||
|
maven("https://raw.githubusercontent.com/fankes/maven-repository/main/repository/releases")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sweetProperty {
|
plugins {
|
||||||
|
id("com.highcapable.gropify") version "1.0.0"
|
||||||
|
}
|
||||||
|
gropify {
|
||||||
global {
|
global {
|
||||||
all {
|
common {
|
||||||
|
includeKeys(
|
||||||
|
"GITHUB_CI_COMMIT_ID",
|
||||||
|
"^project\\..*\$".toRegex()
|
||||||
|
)
|
||||||
permanentKeyValues("GITHUB_CI_COMMIT_ID" to "")
|
permanentKeyValues("GITHUB_CI_COMMIT_ID" to "")
|
||||||
generateFrom(ROOT_PROJECT, SYSTEM_ENV)
|
locations(GropifyLocation.RootProject, GropifyLocation.SystemEnv)
|
||||||
}
|
}
|
||||||
sourcesCode {
|
android {
|
||||||
includeKeys("GITHUB_CI_COMMIT_ID")
|
includeKeys("GITHUB_CI_COMMIT_ID")
|
||||||
// 关闭类型自动转换功能,防止一些特殊 "COMMIT ID" 被生成为数值
|
// 关闭类型自动转换功能,防止一些特殊 "COMMIT ID" 被生成为数值
|
||||||
isEnableTypeAutoConversion = false
|
useTypeAutoConversion = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject { all { isEnable = false } }
|
rootProject { common { isEnabled = false } }
|
||||||
}
|
}
|
||||||
rootProject.name = "ColorOSNotifyIcon"
|
rootProject.name = "ColorOSNotifyIcon"
|
||||||
include(":app")
|
include(":app")
|
||||||
Reference in New Issue
Block a user