Dhizuku API v2.4 hardcoded the com.rosan.dhizuku.server.provider authority and could not discover OwnDroid's content provider. v2.5.4 dynamically resolves the device owner app's provider, enabling OwnDroid support.
170 lines
5.5 KiB
Groovy
170 lines
5.5 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
}
|
|
|
|
def getGitHash = { ->
|
|
def stdout = new ByteArrayOutputStream()
|
|
exec {
|
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
standardOutput = stdout
|
|
}
|
|
return stdout.toString().trim()
|
|
}
|
|
|
|
android {
|
|
defaultConfig {
|
|
applicationId "deltazero.amarok"
|
|
minSdkVersion 26
|
|
targetSdkVersion 36
|
|
compileSdk = 36
|
|
versionCode 124
|
|
versionName "0.10.1"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
buildConfigField "String", "GITHUB_CHECK_UPDATE_URL", '"https://api.github.com/repos/deltazefiro/Amarok-Hider/releases"'
|
|
}
|
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
signingConfigs {
|
|
release {
|
|
storeFile file(RELEASE_STORE_FILE)
|
|
storePassword RELEASE_STORE_PASSWORD
|
|
keyAlias RELEASE_KEY_ALIAS
|
|
keyPassword RELEASE_KEY_PASSWORD
|
|
|
|
enableV2Signing = true
|
|
enableV3Signing = true
|
|
enableV4Signing = true
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
debug {
|
|
versionNameSuffix "+${getGitHash()}"
|
|
debuggable true
|
|
}
|
|
}
|
|
|
|
productFlavors {
|
|
flavorDimensions = ['version']
|
|
appcenter {
|
|
dimension 'version'
|
|
}
|
|
playstore {
|
|
dimension 'version'
|
|
applicationIdSuffix '.app'
|
|
}
|
|
foss {
|
|
dimension 'version'
|
|
applicationIdSuffix '.foss'
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
playstore {
|
|
java.srcDirs = ['src/playstore/java']
|
|
}
|
|
appcenter {
|
|
java.srcDirs = ['src/appcenter/java']
|
|
}
|
|
foss {
|
|
java.srcDirs = ['src/foss/java']
|
|
}
|
|
}
|
|
|
|
applicationVariants.configureEach { variant ->
|
|
def flavorName = variant.productFlavors[0].name
|
|
if (flavorName == "appcenter") {
|
|
variant.outputs.configureEach { output ->
|
|
outputFileName = "Amarok-v${variant.versionName}.apk"
|
|
}
|
|
} else {
|
|
variant.outputs.configureEach { output ->
|
|
outputFileName = "Amarok-v${variant.versionName}-${flavorName}.apk"
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_21
|
|
targetCompatibility JavaVersion.VERSION_21
|
|
}
|
|
|
|
dependenciesInfo {
|
|
includeInApk = false
|
|
includeInBundle = false
|
|
}
|
|
|
|
namespace 'deltazero.amarok'
|
|
buildFeatures {
|
|
buildConfig true
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
def shizukuVersion = '13.1.5'
|
|
implementation "dev.rikka.shizuku:api:${shizukuVersion}"
|
|
implementation "dev.rikka.shizuku:provider:${shizukuVersion}"
|
|
|
|
def appCenterSdkVersion = '5.0.4'
|
|
playstoreImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
|
|
appcenterImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
|
|
appcenterImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
|
|
appcenterImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}"
|
|
|
|
implementation 'dev.rikka.rikkax.material:material-preference:2.0.0'
|
|
implementation 'dev.rikka.rikkax.appcompat:appcompat:1.6.1'
|
|
implementation 'io.github.iamr0s:Dhizuku-API:2.5.4'
|
|
implementation 'com.github.getActivity:XXPermissions:20.0'
|
|
implementation 'com.github.getActivity:EasyWindow:10.62'
|
|
implementation 'com.github.heruoxin.Delegated-Scopes-Manager:client:master-SNAPSHOT'
|
|
implementation 'com.github.kyuubiran:EzXHelper:2.2.1'
|
|
implementation 'com.github.takusemba:spotlight:2.0.5'
|
|
implementation 'com.github.topjohnwu.libsu:core:6.0.0'
|
|
implementation 'com.github.skydoves:colorpickerview:2.3.0'
|
|
implementation 'com.google.android.material:material:1.13.0'
|
|
implementation 'com.jonathanfinerty.once:once:1.3.1'
|
|
implementation 'com.kizitonwose.calendar:view:2.9.0'
|
|
implementation 'com.squareup.okhttp3:okhttp:5.3.1'
|
|
implementation 'nl.dionsegijn:konfetti-xml:2.0.5'
|
|
implementation 'androidx.biometric:biometric:1.1.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
implementation 'androidx.preference:preference:1.2.1'
|
|
implementation 'androidx.work:work-runtime:2.11.0'
|
|
implementation 'org.apache.maven:maven-artifact:3.9.11'
|
|
|
|
// F-Droid disallow `api.xposed.info` since it's not a "Trusted Maven Repository".
|
|
// So we create a mirror GitHub repository and obtain the library from `jitpack.io` instead.
|
|
// Equivalent to `implementation 'de.robv.android.xposed:api:82'`.
|
|
compileOnly 'com.github.deltazefiro:XposedBridge:main-SNAPSHOT'
|
|
}
|
|
|
|
configurations.configureEach {
|
|
exclude group: 'androidx.appcompat', module: 'appcompat'
|
|
}
|
|
|
|
apply plugin: 'dev.rikka.tools.autoresconfig'
|
|
autoResConfig {
|
|
generateClass = true
|
|
generatedClassFullName = "deltazero.amarok.utils.LangList"
|
|
generateRes = true
|
|
generatedResPrefix = null
|
|
generatedArrayFirstItem = "SYSTEM"
|
|
generateLocaleConfig = true
|
|
}
|