mirror of
https://github.com/Fox2Code/FoxMagiskModuleManager
synced 2024-11-16 12:13:21 +00:00
e1cc03045d
We need a different build flavor for F-Droid because they forbid auto-updaters as they download blobs from the internet (and it wouldn't be possible to install the downloaded APK anyways because of the signatures mismatch). I chose to implement this using a build config field instead of using a per-build-flavor source directory because I thought it introduces less maintenance burden. In particular, per-build-flavor source directories would require an interface in the main source directory for the update manager, which would be implemented for each build flavor in a specific source directory. Considering this project doesn't have CI builds yet, I think it wouldn't be wise. Still we might reconsider should we need more complex setup (such as different dependencies for the two build flavors). The main downside of the build config field for now is that it may be more prone to silent regressions. Fixes #41
103 lines
3.3 KiB
Groovy
103 lines
3.3 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'com.mikepenz.aboutlibraries.plugin'
|
|
}
|
|
|
|
android {
|
|
compileSdk 32
|
|
|
|
defaultConfig {
|
|
applicationId "com.fox2code.mmm"
|
|
minSdk 21
|
|
targetSdk 32
|
|
versionCode 35
|
|
versionName "0.4.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile(
|
|
'proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
debug {
|
|
applicationIdSuffix '.debug'
|
|
debuggable true
|
|
}
|
|
}
|
|
|
|
flavorDimensions "type"
|
|
productFlavors {
|
|
"default" {
|
|
dimension "type"
|
|
buildConfigField "boolean", "ENABLE_AUTO_UPDATER", "true"
|
|
}
|
|
|
|
fdroid {
|
|
dimension "type"
|
|
applicationIdSuffix ".fdroid"
|
|
|
|
// Need to disable auto-updater for F-Droid flavor because their inclusion policy
|
|
// forbids downloading blobs from third-party websites (and F-Droid APK isn't signed
|
|
// with our keys, so the APK wouldn't install anyways).
|
|
buildConfigField "boolean", "ENABLE_AUTO_UPDATER", "false"
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
lint {
|
|
disable 'MissingTranslation'
|
|
}
|
|
}
|
|
|
|
aboutLibraries {
|
|
additionalLicenses = ["LGPL_3_0_only"]
|
|
}
|
|
|
|
configurations {
|
|
implementation.exclude group: 'org.jetbrains' , module: 'annotations'
|
|
}
|
|
|
|
dependencies {
|
|
// UI
|
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
|
implementation 'androidx.emoji2:emoji2:1.1.0'
|
|
implementation 'androidx.emoji2:emoji2-views-helper:1.1.0'
|
|
implementation 'androidx.preference:preference:1.2.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
implementation 'androidx.webkit:webkit:1.4.0'
|
|
implementation 'com.google.android.material:material:1.5.0'
|
|
implementation "com.mikepenz:aboutlibraries:${latestAboutLibsRelease}"
|
|
implementation "dev.rikka.rikkax.layoutinflater:layoutinflater:1.2.0"
|
|
implementation "dev.rikka.rikkax.insets:insets:1.2.0"
|
|
implementation 'com.github.Dimezis:BlurView:version-1.6.6'
|
|
|
|
// Utils
|
|
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.9.3'
|
|
implementation 'com.squareup.okhttp3:okhttp-brotli:4.9.3'
|
|
implementation 'com.github.topjohnwu.libsu:io:4.0.3'
|
|
|
|
// Markdown
|
|
implementation "io.noties.markwon:core:4.6.2"
|
|
implementation "io.noties.markwon:html:4.6.2"
|
|
implementation "io.noties.markwon:image:4.6.2"
|
|
implementation "io.noties.markwon:syntax-highlight:4.6.2"
|
|
annotationProcessor "io.noties:prism4j-bundler:2.0.0"
|
|
implementation "com.caverock:androidsvg:1.4"
|
|
|
|
// Utils for compat (Needs to be outsourced ASAP)
|
|
// compileOnly "org.robolectric:android-all:11-robolectric-6757853"
|
|
|
|
// Test
|
|
testImplementation 'junit:junit:4.+'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
|
} |