mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-01 08:45:16 +08:00
chore: migrate build script from groovy to kts
- using SweetDependency, SweetProperty - merge singing key file configs to properties - update gradle and dependencies
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,7 +1,6 @@
|
|||||||
# Project exclude paths
|
# Project exclude paths
|
||||||
*.iml
|
*.iml
|
||||||
.gradle
|
.gradle
|
||||||
.secret/APP_CENTER_SECRET
|
|
||||||
/local.properties
|
/local.properties
|
||||||
/.idea/caches
|
/.idea/caches
|
||||||
/.idea/libraries
|
/.idea/libraries
|
||||||
|
1
.secret/.gitignore
vendored
Normal file
1
.secret/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/secret.properties
|
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"keyAlias": "public",
|
|
||||||
"keyPassword": "123456",
|
|
||||||
"storeFileName": "universal.p12",
|
|
||||||
"storePassword": "123456"
|
|
||||||
}
|
|
102
app/build.gradle
102
app/build.gradle
@@ -1,102 +0,0 @@
|
|||||||
import groovy.json.JsonSlurper
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id 'com.android.application'
|
|
||||||
id 'org.jetbrains.kotlin.android'
|
|
||||||
id 'com.google.devtools.ksp'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
signingConfigs {
|
|
||||||
universal {
|
|
||||||
def dirPath = rootProject.ext.app.signingConfigs.secretConfigsDirPath
|
|
||||||
def fileName = rootProject.ext.app.signingConfigs.secretConfigsFileName
|
|
||||||
def configs = new JsonSlurper().parse(file("${dirPath}/${fileName}"))
|
|
||||||
keyAlias configs.keyAlias
|
|
||||||
keyPassword configs.keyPassword
|
|
||||||
storeFile file("${dirPath}/${configs.storeFileName}")
|
|
||||||
storePassword configs.storePassword
|
|
||||||
v1SigningEnabled true
|
|
||||||
v2SigningEnabled true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace 'com.fankes.apperrorstracking'
|
|
||||||
compileSdk rootProject.ext.android.compileSdk
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId 'com.fankes.apperrorstracking'
|
|
||||||
|
|
||||||
minSdk rootProject.ext.android.minSdk
|
|
||||||
targetSdk rootProject.ext.android.targetSdk
|
|
||||||
|
|
||||||
versionCode rootProject.ext.app.versionCode
|
|
||||||
versionName rootProject.ext.app.versionName
|
|
||||||
|
|
||||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
||||||
|
|
||||||
/** 添加 App Center Secret 到 BuildConfig */
|
|
||||||
buildConfigField('String', 'APP_CENTER_SECRET', "\"${getAppCenterSecret()}\"")
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
debug {
|
|
||||||
minifyEnabled false
|
|
||||||
signingConfig signingConfigs.universal
|
|
||||||
}
|
|
||||||
release {
|
|
||||||
minifyEnabled true
|
|
||||||
shrinkResources true
|
|
||||||
zipAlignEnabled true
|
|
||||||
signingConfig signingConfigs.universal
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '11'
|
|
||||||
freeCompilerArgs = [
|
|
||||||
'-Xno-param-assertions',
|
|
||||||
'-Xno-call-assertions',
|
|
||||||
'-Xno-receiver-assertions'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
lintOptions {
|
|
||||||
checkReleaseBuilds false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 App Center Secret
|
|
||||||
* @return [String]
|
|
||||||
*/
|
|
||||||
String getAppCenterSecret() {
|
|
||||||
def fileName = '../.secret/APP_CENTER_SECRET'
|
|
||||||
def content = ''
|
|
||||||
if (file(fileName).exists()) file(fileName).eachLine { content = it }
|
|
||||||
return content
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly 'de.robv.android.xposed:api:82'
|
|
||||||
implementation 'com.highcapable.yukihookapi:api:1.1.11'
|
|
||||||
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.11'
|
|
||||||
implementation 'com.microsoft.appcenter:appcenter-analytics:5.0.0'
|
|
||||||
implementation 'com.microsoft.appcenter:appcenter-crashes:5.0.0'
|
|
||||||
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.7'
|
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
|
||||||
implementation 'com.github.duanhong169:drawabletoolbox:1.0.7'
|
|
||||||
implementation 'com.github.topjohnwu.libsu:core:5.0.4'
|
|
||||||
implementation 'androidx.core:core-ktx:1.10.0'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
||||||
implementation 'com.google.android.material:material:1.9.0'
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
||||||
}
|
|
23
build.gradle
23
build.gradle
@@ -1,23 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.application' version '7.4.1' apply false
|
|
||||||
id 'com.android.library' version '7.4.1' apply false
|
|
||||||
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
|
|
||||||
id 'com.google.devtools.ksp' version '1.8.20-1.0.10' apply false
|
|
||||||
}
|
|
||||||
|
|
||||||
ext {
|
|
||||||
android = [
|
|
||||||
compileSdk: 33,
|
|
||||||
minSdk : 24,
|
|
||||||
targetSdk : 33,
|
|
||||||
ndkVersion: '24.0.8215888'
|
|
||||||
]
|
|
||||||
app = [
|
|
||||||
versionName : '1.25',
|
|
||||||
versionCode : 5,
|
|
||||||
signingConfigs: [
|
|
||||||
secretConfigsDirPath : "${projectDir.getAbsolutePath()}/.secret",
|
|
||||||
secretConfigsFileName: "key_store_secret.json"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
5
build.gradle.kts
Normal file
5
build.gradle.kts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
plugins {
|
||||||
|
autowire(libs.plugins.android.application) apply false
|
||||||
|
autowire(libs.plugins.kotlin.android) apply false
|
||||||
|
autowire(libs.plugins.kotlin.ksp) apply false
|
||||||
|
}
|
@@ -1,85 +0,0 @@
|
|||||||
import groovy.json.JsonSlurper
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id 'com.android.application'
|
|
||||||
id 'org.jetbrains.kotlin.android'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'com.fankes.apperrorsdemo'
|
|
||||||
compileSdk rootProject.ext.android.compileSdk
|
|
||||||
ndkVersion rootProject.ext.android.ndkVersion
|
|
||||||
|
|
||||||
signingConfigs {
|
|
||||||
universal {
|
|
||||||
def dirPath = rootProject.ext.app.signingConfigs.secretConfigsDirPath
|
|
||||||
def fileName = rootProject.ext.app.signingConfigs.secretConfigsFileName
|
|
||||||
def configs = new JsonSlurper().parse(file("${dirPath}/${fileName}"))
|
|
||||||
keyAlias configs.keyAlias
|
|
||||||
keyPassword configs.keyPassword
|
|
||||||
storeFile file("${dirPath}/${configs.storeFileName}")
|
|
||||||
storePassword configs.storePassword
|
|
||||||
v1SigningEnabled true
|
|
||||||
v2SigningEnabled true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId 'com.fankes.apperrorsdemo'
|
|
||||||
|
|
||||||
minSdk rootProject.ext.android.minSdk
|
|
||||||
targetSdk rootProject.ext.android.targetSdk
|
|
||||||
|
|
||||||
versionCode rootProject.ext.app.versionCode
|
|
||||||
versionName rootProject.ext.app.versionName
|
|
||||||
|
|
||||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
||||||
consumerProguardFiles 'consumer-rules.pro'
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
debug {
|
|
||||||
minifyEnabled false
|
|
||||||
signingConfig signingConfigs.universal
|
|
||||||
}
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
signingConfig signingConfigs.universal
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
path "src/main/cpp/CMakeLists.txt"
|
|
||||||
version "3.22.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '11'
|
|
||||||
freeCompilerArgs = [
|
|
||||||
'-Xno-param-assertions',
|
|
||||||
'-Xno-call-assertions',
|
|
||||||
'-Xno-receiver-assertions'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
lintOptions {
|
|
||||||
checkReleaseBuilds false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation 'com.highcapable.yukireflection:api:1.0.2'
|
|
||||||
implementation 'androidx.core:core-ktx:1.10.0'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
||||||
implementation 'com.google.android.material:material:1.9.0'
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
||||||
}
|
|
83
demo-app/build.gradle.kts
Normal file
83
demo-app/build.gradle.kts
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
plugins {
|
||||||
|
autowire(libs.plugins.android.application)
|
||||||
|
autowire(libs.plugins.kotlin.android)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = property.project.demo.app.packageName
|
||||||
|
compileSdk = property.project.android.compileSdk
|
||||||
|
ndkVersion = property.project.android.ndk.version
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
create("universal") {
|
||||||
|
keyAlias = property.project.demo.app.signing.keyAlias
|
||||||
|
keyPassword = property.project.demo.app.signing.keyPassword
|
||||||
|
storeFile = rootProject.file(property.project.demo.app.signing.storeFilePath)
|
||||||
|
storePassword = property.project.demo.app.signing.storePassword
|
||||||
|
enableV1Signing = true
|
||||||
|
enableV2Signing = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = property.project.demo.app.packageName
|
||||||
|
minSdk = property.project.android.minSdk
|
||||||
|
targetSdk = property.project.android.targetSdk
|
||||||
|
versionName = property.project.demo.app.versionName
|
||||||
|
versionCode = property.project.demo.app.versionCode
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
all { signingConfig = signingConfigs.getByName("universal") }
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
path("src/main/cpp/CMakeLists.txt")
|
||||||
|
version = property.project.android.cmake.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "17"
|
||||||
|
freeCompilerArgs = listOf(
|
||||||
|
"-Xno-param-assertions",
|
||||||
|
"-Xno-call-assertions",
|
||||||
|
"-Xno-receiver-assertions"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
lint { checkReleaseBuilds = false }
|
||||||
|
androidResources.additionalParameters += listOf("--allow-reserved-package-id", "--package-id", "0x37")
|
||||||
|
}
|
||||||
|
|
||||||
|
androidComponents {
|
||||||
|
onVariants(selector().all()) {
|
||||||
|
it.outputs.forEach { output ->
|
||||||
|
val currentType = it.buildType
|
||||||
|
val currentSuffix = property.github.ci.commit.id.let { suffix -> if (suffix.isNotBlank()) "-$suffix" else "" }
|
||||||
|
val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})"
|
||||||
|
if (output is com.android.build.api.variant.impl.VariantOutputImpl)
|
||||||
|
output.outputFileName.set("${property.project.name}-v$currentVersion-$currentType.apk")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(com.fankes.projectpromote.project.promote)
|
||||||
|
implementation(com.highcapable.yukireflection.api)
|
||||||
|
implementation(androidx.core.core.ktx)
|
||||||
|
implementation(androidx.appcompat.appcompat)
|
||||||
|
implementation(com.google.android.material.material)
|
||||||
|
testImplementation(junit.junit)
|
||||||
|
androidTestImplementation(androidx.test.ext.junit)
|
||||||
|
androidTestImplementation(androidx.test.espresso.espresso.core)
|
||||||
|
}
|
@@ -1,25 +1,27 @@
|
|||||||
# Project-wide Gradle settings.
|
# Compiler Configuration
|
||||||
# IDE (e.g. Android Studio) users:
|
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||||
# Gradle settings configured through the IDE *will override*
|
|
||||||
# any settings specified in this file.
|
|
||||||
# For more details on how to configure your build environment visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
|
||||||
org.gradle.jvmargs=-XX:+UseParallelGC
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
||||||
# org.gradle.parallel=true
|
|
||||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
|
||||||
# Android operating system, and which are packaged with your app"s APK
|
|
||||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
# Kotlin code style for this project: "official" or "obsolete":
|
|
||||||
kotlin.code.style=official
|
|
||||||
# Enables namespacing of each library's R class so that its R class includes only the
|
|
||||||
# resources declared in the library itself and none from the library's dependencies,
|
|
||||||
# thereby reducing the size of the R class for that library
|
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
# Incremental
|
kotlin.code.style=official
|
||||||
kotlin.incremental.useClasspathSnapshot=true
|
kotlin.incremental.useClasspathSnapshot=true
|
||||||
|
# Project Configuration
|
||||||
|
project.name=AppErrorsTracking
|
||||||
|
project.android.compileSdk=34
|
||||||
|
project.android.minSdk=24
|
||||||
|
project.android.targetSdk=33
|
||||||
|
project.android.ndk.version="24.0.8215888"
|
||||||
|
project.android.cmake.version="3.22.1"
|
||||||
|
project.module-app.packageName=com.fankes.apperrorstracking
|
||||||
|
project.module-app.versionName="1.25"
|
||||||
|
project.module-app.versionCode=5
|
||||||
|
project.module-app.signing.keyAlias=public
|
||||||
|
project.module-app.signing.keyPassword="123456"
|
||||||
|
project.module-app.signing.storePassword="123456"
|
||||||
|
project.module-app.signing.storeFilePath=.secret/universal.p12
|
||||||
|
project.demo-app.packageName=com.fankes.apperrorsdemo
|
||||||
|
project.demo-app.versionName=${project.module-app.versionName}
|
||||||
|
project.demo-app.versionCode=${project.module-app.versionCode}
|
||||||
|
project.demo-app.signing.keyAlias=${project.module-app.signing.keyAlias}
|
||||||
|
project.demo-app.signing.keyPassword=${project.module-app.signing.keyPassword}
|
||||||
|
project.demo-app.signing.storePassword=${project.module-app.signing.storePassword}
|
||||||
|
project.demo-app.signing.storeFilePath=${project.module-app.signing.storeFilePath}
|
89
gradle/sweet-dependency/sweet-dependency-config.yaml
Normal file
89
gradle/sweet-dependency/sweet-dependency-config.yaml
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
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.1.1
|
||||||
|
org.jetbrains.kotlin.android:
|
||||||
|
alias: kotlin-android
|
||||||
|
version: 1.9.10
|
||||||
|
com.google.devtools.ksp:
|
||||||
|
alias: kotlin-ksp
|
||||||
|
version: 1.9.10-1.0.13
|
||||||
|
|
||||||
|
libraries:
|
||||||
|
com.fankes.projectpromote:
|
||||||
|
project-promote:
|
||||||
|
version: 1.0.0
|
||||||
|
repositories:
|
||||||
|
fankes-maven-releases
|
||||||
|
de.robv.android.xposed:
|
||||||
|
api:
|
||||||
|
version: 82
|
||||||
|
repositories:
|
||||||
|
rovo89-xposed-api
|
||||||
|
com.highcapable.yukihookapi:
|
||||||
|
api:
|
||||||
|
version: 1.1.11
|
||||||
|
ksp-xposed:
|
||||||
|
version-ref: <this>::api
|
||||||
|
com.highcapable.yukireflection:
|
||||||
|
api:
|
||||||
|
version: 1.0.2
|
||||||
|
com.microsoft.appcenter:
|
||||||
|
appcenter-analytics:
|
||||||
|
version: 5.0.0
|
||||||
|
appcenter-crashes:
|
||||||
|
version-ref: <this>::appcenter-analytics
|
||||||
|
com.github.topjohnwu.libsu:
|
||||||
|
core:
|
||||||
|
version: 5.0.5
|
||||||
|
com.github.duanhong169:
|
||||||
|
drawabletoolbox:
|
||||||
|
version: 1.0.7
|
||||||
|
com.google.code.gson:
|
||||||
|
gson:
|
||||||
|
version: 2.10.1
|
||||||
|
com.squareup.okhttp3:
|
||||||
|
okhttp:
|
||||||
|
version: 5.0.0-alpha.11
|
||||||
|
androidx.core:
|
||||||
|
core-ktx:
|
||||||
|
version: 1.12.0
|
||||||
|
androidx.appcompat:
|
||||||
|
appcompat:
|
||||||
|
version: 1.6.1
|
||||||
|
com.google.android.material:
|
||||||
|
material:
|
||||||
|
version: 1.9.0
|
||||||
|
androidx.constraintlayout:
|
||||||
|
constraintlayout:
|
||||||
|
version: 2.1.4
|
||||||
|
androidx.test.ext:
|
||||||
|
junit:
|
||||||
|
version: 1.1.5
|
||||||
|
androidx.test.espresso:
|
||||||
|
espresso-core:
|
||||||
|
version: 3.5.1
|
||||||
|
junit:
|
||||||
|
junit:
|
||||||
|
version: 4.13.2
|
5
gradle/wrapper/gradle-wrapper.properties
vendored
5
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,5 @@
|
|||||||
#Wed May 04 08:35:13 CST 2022
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
87
module-app/build.gradle.kts
Normal file
87
module-app/build.gradle.kts
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
plugins {
|
||||||
|
autowire(libs.plugins.android.application)
|
||||||
|
autowire(libs.plugins.kotlin.android)
|
||||||
|
autowire(libs.plugins.kotlin.ksp)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = property.project.module.app.packageName
|
||||||
|
compileSdk = property.project.android.compileSdk
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
create("universal") {
|
||||||
|
keyAlias = property.project.module.app.signing.keyAlias
|
||||||
|
keyPassword = property.project.module.app.signing.keyPassword
|
||||||
|
storeFile = rootProject.file(property.project.module.app.signing.storeFilePath)
|
||||||
|
storePassword = property.project.module.app.signing.storePassword
|
||||||
|
enableV1Signing = true
|
||||||
|
enableV2Signing = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = property.project.module.app.packageName
|
||||||
|
minSdk = property.project.android.minSdk
|
||||||
|
targetSdk = property.project.android.targetSdk
|
||||||
|
versionName = property.project.module.app.versionName
|
||||||
|
versionCode = property.project.module.app.versionCode
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
all { signingConfig = signingConfigs.getByName("universal") }
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
isShrinkResources = true
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "17"
|
||||||
|
freeCompilerArgs = listOf(
|
||||||
|
"-Xno-param-assertions",
|
||||||
|
"-Xno-call-assertions",
|
||||||
|
"-Xno-receiver-assertions"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
lint { checkReleaseBuilds = false }
|
||||||
|
androidResources.additionalParameters += listOf("--allow-reserved-package-id", "--package-id", "0x37")
|
||||||
|
}
|
||||||
|
|
||||||
|
androidComponents {
|
||||||
|
onVariants(selector().all()) {
|
||||||
|
it.outputs.forEach { output ->
|
||||||
|
val currentType = it.buildType
|
||||||
|
val currentSuffix = property.github.ci.commit.id.let { suffix -> if (suffix.isNotBlank()) "-$suffix" else "" }
|
||||||
|
val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})"
|
||||||
|
if (output is com.android.build.api.variant.impl.VariantOutputImpl)
|
||||||
|
output.outputFileName.set("${property.project.name}-v$currentVersion-$currentType.apk")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly(de.robv.android.xposed.api)
|
||||||
|
implementation(com.highcapable.yukihookapi.api)
|
||||||
|
ksp(com.highcapable.yukihookapi.ksp.xposed)
|
||||||
|
implementation(com.fankes.projectpromote.project.promote)
|
||||||
|
implementation(com.microsoft.appcenter.appcenter.analytics)
|
||||||
|
implementation(com.microsoft.appcenter.appcenter.crashes)
|
||||||
|
implementation(com.github.topjohnwu.libsu.core)
|
||||||
|
implementation(com.github.duanhong169.drawabletoolbox)
|
||||||
|
implementation(com.google.code.gson.gson)
|
||||||
|
implementation(com.squareup.okhttp3.okhttp)
|
||||||
|
implementation(androidx.core.core.ktx)
|
||||||
|
implementation(androidx.appcompat.appcompat)
|
||||||
|
implementation(com.google.android.material.material)
|
||||||
|
implementation(androidx.constraintlayout.constraintlayout)
|
||||||
|
testImplementation(junit.junit)
|
||||||
|
androidTestImplementation(androidx.test.ext.junit)
|
||||||
|
androidTestImplementation(androidx.test.espresso.espresso.core)
|
||||||
|
}
|
@@ -1,20 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
gradlePluginPortal()
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dependencyResolutionManagement {
|
|
||||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
maven { url "https://api.xposed.info/" }
|
|
||||||
maven { url "https://www.jitpack.io" }
|
|
||||||
maven { url "https://s01.oss.sonatype.org/content/repositories/releases" }
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rootProject.name = "AppErrorsTracking"
|
|
||||||
include ':app'
|
|
||||||
include ':demo-app'
|
|
29
settings.gradle.kts
Normal file
29
settings.gradle.kts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugins {
|
||||||
|
id("com.highcapable.sweetdependency") version "1.0.1"
|
||||||
|
id("com.highcapable.sweetproperty") version "1.0.2"
|
||||||
|
}
|
||||||
|
sweetProperty {
|
||||||
|
global {
|
||||||
|
all {
|
||||||
|
permanentKeyValues(
|
||||||
|
"GITHUB_CI_COMMIT_ID" to "",
|
||||||
|
"APP_CENTER_SECRET" to ""
|
||||||
|
)
|
||||||
|
generateFrom(ROOT_PROJECT, SYSTEM_ENV)
|
||||||
|
}
|
||||||
|
sourcesCode {
|
||||||
|
propertiesFileNames(".secret/secret.properties")
|
||||||
|
includeKeys("GITHUB_CI_COMMIT_ID", "APP_CENTER_SECRET")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rootProject { all { isEnable = false } }
|
||||||
|
}
|
||||||
|
rootProject.name = "AppErrorsTracking"
|
||||||
|
include(":module-app", ":demo-app")
|
Reference in New Issue
Block a user