2021-10-01 20:19:42 +00:00
|
|
|
plugins {
|
2022-10-18 14:00:10 +00:00
|
|
|
// Gradle doesn't allow conditionally enabling/disabling plugins
|
2022-11-26 02:00:30 +00:00
|
|
|
id "io.sentry.android.gradle" version "3.3.0"
|
2021-10-01 20:19:42 +00:00
|
|
|
id 'com.android.application'
|
|
|
|
id 'com.mikepenz.aboutlibraries.plugin'
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2022-09-14 00:14:52 +00:00
|
|
|
namespace "com.fox2code.mmm"
|
2022-07-15 15:22:37 +00:00
|
|
|
compileSdk 33
|
2022-12-10 20:23:02 +00:00
|
|
|
buildToolsVersion '33.0.0'
|
2022-12-07 20:38:55 +00:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
// Everything comes from local.properties
|
|
|
|
Properties properties = new Properties()
|
2022-12-07 20:47:00 +00:00
|
|
|
if (project.rootProject.file('local.properties').exists()) {
|
|
|
|
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
2022-12-17 18:04:55 +00:00
|
|
|
// java.lang.IllegalArgumentException: path may not be null or empty string. path='null'
|
|
|
|
if (properties.getProperty('keystore.file') != null) {
|
|
|
|
// FFS DO NOT CHANGE THIS, IT WILL BREAK THE BUILD
|
|
|
|
storeFile file(properties.getProperty('keystore.file'))
|
|
|
|
storePassword properties.getProperty('keystore.password')
|
|
|
|
keyAlias 'key0'
|
|
|
|
keyPassword properties.getProperty('keystore.password')
|
|
|
|
}
|
2022-12-07 20:47:00 +00:00
|
|
|
}
|
2022-12-07 20:38:55 +00:00
|
|
|
}
|
|
|
|
}
|
2021-10-01 20:19:42 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.fox2code.mmm"
|
2022-12-14 21:24:54 +00:00
|
|
|
minSdk 23
|
2022-07-15 15:22:37 +00:00
|
|
|
targetSdk 33
|
2022-12-19 17:18:11 +00:00
|
|
|
versionCode 64
|
|
|
|
versionName "1.1.0"
|
2021-10-01 20:19:42 +00:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2022-12-07 20:38:55 +00:00
|
|
|
signingConfig signingConfigs.release
|
2022-12-17 02:31:39 +00:00
|
|
|
archivesBaseName = "FoxMMM-v$versionName"
|
2021-10-01 20:19:42 +00:00
|
|
|
}
|
|
|
|
|
2022-12-12 16:48:01 +00:00
|
|
|
splits {
|
|
|
|
|
|
|
|
// Configures multiple APKs based on ABI.
|
|
|
|
abi {
|
|
|
|
|
|
|
|
// Enables building multiple APKs per ABI.
|
|
|
|
enable true
|
|
|
|
|
|
|
|
// By default all ABIs are included, so use reset() and include to specify that we only
|
|
|
|
// want APKs for x86 and x86_64.
|
|
|
|
|
|
|
|
// Resets the list of ABIs that Gradle should create APKs for to none.
|
|
|
|
reset()
|
|
|
|
|
|
|
|
// Specifies a list of ABIs that Gradle should create APKs for.
|
|
|
|
include "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
|
|
|
|
|
|
|
|
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
|
|
|
|
universalApk true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-01 20:19:42 +00:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2022-12-07 20:38:55 +00:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
|
2022-12-11 02:36:21 +00:00
|
|
|
'proguard-rules.pro'
|
2021-10-01 20:19:42 +00:00
|
|
|
}
|
|
|
|
debug {
|
|
|
|
applicationIdSuffix '.debug'
|
|
|
|
debuggable true
|
2022-12-06 22:29:28 +00:00
|
|
|
|
2022-09-14 00:14:52 +00:00
|
|
|
// ONLY FOR TESTING SENTRY
|
2022-11-27 16:50:31 +00:00
|
|
|
// minifyEnabled true
|
|
|
|
// shrinkResources true
|
|
|
|
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
|
2021-10-01 20:19:42 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-30 17:09:00 +00:00
|
|
|
|
|
|
|
flavorDimensions "type"
|
|
|
|
productFlavors {
|
|
|
|
"default" {
|
2022-12-27 18:51:39 +00:00
|
|
|
// Latest commit hash as BuildConfig.COMMIT_HASH
|
|
|
|
def gitCommitHash = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
|
|
|
|
buildConfigField "String", "COMMIT_HASH", "\"${gitCommitHash}\""
|
|
|
|
// Get the current branch name as BuildConfig.BRANCH_NAME
|
|
|
|
def gitBranchName = 'git rev-parse --abbrev-ref HEAD'.execute([], project.rootDir).text.trim()
|
|
|
|
buildConfigField "String", "BRANCH_NAME", "\"${gitBranchName}\""
|
|
|
|
// Get remote url as BuildConfig.REMOTE_URL
|
|
|
|
def gitRemoteUrl = 'git config --get remote.origin.url'.execute([], project.rootDir).text.trim()
|
|
|
|
buildConfigField "String", "REMOTE_URL", "\"${gitRemoteUrl}\""
|
2022-03-30 17:09:00 +00:00
|
|
|
dimension "type"
|
|
|
|
buildConfigField "boolean", "ENABLE_AUTO_UPDATER", "true"
|
2022-08-29 15:32:28 +00:00
|
|
|
buildConfigField "boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "true"
|
2022-12-11 02:36:21 +00:00
|
|
|
if (hasSentryConfig) {
|
|
|
|
Properties properties = new Properties()
|
|
|
|
try (FileInputStream fis = new FileInputStream(sentryConfigFile)) {
|
|
|
|
properties.load(fis)
|
|
|
|
}
|
|
|
|
buildConfigField "String", "SENTRY_TOKEN", '"' + properties.getProperty("auth." + "token") + '"'
|
2022-12-15 02:31:33 +00:00
|
|
|
} else {
|
|
|
|
buildConfigField "String", "SENTRY_TOKEN", '""'
|
2022-12-11 02:36:21 +00:00
|
|
|
}
|
2022-12-06 22:29:28 +00:00
|
|
|
// Get the androidacy client ID from the androidacy.properties
|
|
|
|
Properties properties = new Properties()
|
2022-12-07 20:59:26 +00:00
|
|
|
// If androidacy.properties doesn't exist, use the default client ID which is heavily
|
|
|
|
// rate limited to 30 requests per minute
|
2022-12-06 22:34:35 +00:00
|
|
|
if (project.rootProject.file('androidacy.properties').exists()) {
|
|
|
|
properties.load(project.rootProject.file('androidacy.properties').newDataInputStream())
|
|
|
|
} else {
|
2022-12-07 21:02:45 +00:00
|
|
|
properties.setProperty('client_id', '"5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ"')
|
2022-12-06 22:34:35 +00:00
|
|
|
}
|
2022-12-06 22:29:28 +00:00
|
|
|
buildConfigField("String", "ANDROIDACY_CLIENT_ID", properties.getProperty('client_id'))
|
2022-12-07 20:38:55 +00:00
|
|
|
// If client ID is empty, disable androidacy
|
|
|
|
if (properties.getProperty('client_id').isEmpty()) {
|
|
|
|
buildConfigField("java.util.List<String>",
|
|
|
|
"ENABLED_REPOS", "java.util.Arrays.asList(\"magisk_alt_repo\")")
|
|
|
|
} else {
|
|
|
|
buildConfigField("java.util.List<String>",
|
|
|
|
"ENABLED_REPOS",
|
|
|
|
"java.util.Arrays.asList(\"magisk_alt_repo\", \"androidacy_repo\")",)
|
|
|
|
}
|
|
|
|
|
2022-03-30 17:09:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fdroid {
|
|
|
|
dimension "type"
|
|
|
|
applicationIdSuffix ".fdroid"
|
|
|
|
|
2022-12-27 18:51:39 +00:00
|
|
|
// Latest commit hash as BuildConfig.COMMIT_HASH
|
|
|
|
def gitCommitHash = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
|
|
|
|
buildConfigField "String", "COMMIT_HASH", "\"${gitCommitHash}\""
|
|
|
|
// Get the current branch name as BuildConfig.BRANCH_NAME
|
|
|
|
def gitBranchName = 'git rev-parse --abbrev-ref HEAD'.execute([], project.rootDir).text.trim()
|
|
|
|
buildConfigField "String", "BRANCH_NAME", "\"${gitBranchName}\""
|
|
|
|
// Get remote url as BuildConfig.REMOTE_URL
|
|
|
|
def gitRemoteUrl = 'git config --get remote.origin.url'.execute([], project.rootDir).text.trim()
|
|
|
|
buildConfigField "String", "REMOTE_URL", "\"${gitRemoteUrl}\""
|
|
|
|
|
2022-03-30 17:09:00 +00:00
|
|
|
// 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"
|
2022-04-02 10:43:30 +00:00
|
|
|
|
2022-08-29 15:32:28 +00:00
|
|
|
// Disable crash reporting for F-Droid flavor by default
|
|
|
|
buildConfigField "boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "false"
|
|
|
|
|
2022-12-11 02:36:21 +00:00
|
|
|
if (hasSentryConfig) {
|
|
|
|
Properties properties = new Properties()
|
|
|
|
try (FileInputStream fis = new FileInputStream(sentryConfigFile)) {
|
|
|
|
properties.load(fis)
|
|
|
|
}
|
|
|
|
buildConfigField "String", "SENTRY_TOKEN", '"' + properties.getProperty("auth." + "token") + '"'
|
2022-12-15 02:14:27 +00:00
|
|
|
} else {
|
|
|
|
buildConfigField "String", "SENTRY_TOKEN", '""'
|
2022-12-11 02:36:21 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 10:43:30 +00:00
|
|
|
// Repo with ads or tracking feature are disabled by default for the
|
|
|
|
// F-Droid flavor.
|
2022-09-14 00:14:52 +00:00
|
|
|
buildConfigField("java.util.List<String>",
|
|
|
|
"ENABLED_REPOS",
|
|
|
|
"java.util.Arrays.asList(\"magisk_alt_repo\")",)
|
2022-12-06 22:29:28 +00:00
|
|
|
|
|
|
|
// Get the androidacy client ID from the androidacy.properties
|
|
|
|
Properties properties = new Properties()
|
2022-12-09 19:42:18 +00:00
|
|
|
// If androidacy.properties doesn't exist, use the fdroid client ID which is limited
|
2022-12-07 20:59:26 +00:00
|
|
|
// to 50 requests per minute
|
2022-12-06 22:34:35 +00:00
|
|
|
if (project.rootProject.file('androidacy.properties').exists()) {
|
|
|
|
properties.load(project.rootProject.file('androidacy.properties').newDataInputStream())
|
|
|
|
} else {
|
2022-12-07 21:02:45 +00:00
|
|
|
properties.setProperty('client_id', '"dQ1p7X8bF14PVJ7wAU6ORVjPB2IeTinsuAZ8Uos6tQiyUdUyIjSyZSmN54QBbaTy"')
|
2022-12-06 22:34:35 +00:00
|
|
|
}
|
2022-12-06 22:29:28 +00:00
|
|
|
buildConfigField("String", "ANDROIDACY_CLIENT_ID", properties.getProperty('client_id'))
|
2022-03-30 17:09:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-01 20:19:42 +00:00
|
|
|
compileOptions {
|
2022-12-10 20:23:02 +00:00
|
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
|
|
targetCompatibility JavaVersion.VERSION_11
|
2021-10-01 20:19:42 +00:00
|
|
|
}
|
2022-01-23 18:17:08 +00:00
|
|
|
lint {
|
2021-11-05 14:22:33 +00:00
|
|
|
disable 'MissingTranslation'
|
2022-04-10 07:40:23 +00:00
|
|
|
disable 'TypographyEllipsis'
|
2021-11-05 14:22:33 +00:00
|
|
|
}
|
2021-10-01 20:19:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
aboutLibraries {
|
2022-12-10 20:23:02 +00:00
|
|
|
additionalLicenses = ["LGPL_3_0_only", "Apache_2_0"]
|
2021-10-01 20:19:42 +00:00
|
|
|
}
|
|
|
|
|
2022-12-15 09:00:28 +00:00
|
|
|
configurations {
|
|
|
|
// Access all imported libraries
|
|
|
|
compileOnly.extendsFrom(runtimeOnly)
|
|
|
|
}
|
|
|
|
|
2022-10-18 14:00:10 +00:00
|
|
|
// "true" is not allowed inside this block, use "hasSentryConfig" instead.
|
|
|
|
// This is because gradle doesn't allow to enable/disable plugins conditionally
|
2022-09-14 00:14:52 +00:00
|
|
|
sentry {
|
2022-10-04 14:24:07 +00:00
|
|
|
// Disable sentry on F-Droid flavor
|
2022-12-11 02:36:21 +00:00
|
|
|
ignoredFlavors = []
|
2022-10-04 14:24:07 +00:00
|
|
|
|
2022-09-14 00:14:52 +00:00
|
|
|
// Disables or enables the handling of Proguard mapping for Sentry.
|
|
|
|
// If enabled the plugin will generate a UUID and will take care of
|
|
|
|
// uploading the mapping to Sentry. If disabled, all the logic
|
|
|
|
// related to proguard mapping will be excluded.
|
|
|
|
// Default is enabled.
|
2022-10-18 14:00:10 +00:00
|
|
|
includeProguardMapping = hasSentryConfig
|
2022-09-14 00:14:52 +00:00
|
|
|
|
|
|
|
// Whether the plugin should attempt to auto-upload the mapping file to Sentry or not.
|
|
|
|
// If disabled the plugin will run a dry-run and just generate a UUID.
|
|
|
|
// The mapping file has to be uploaded manually via sentry-cli in this case.
|
|
|
|
// Default is enabled.
|
2022-10-06 12:06:43 +00:00
|
|
|
autoUploadProguardMapping = hasSentryConfig
|
2022-09-14 00:14:52 +00:00
|
|
|
|
|
|
|
// Experimental flag to turn on support for GuardSquare's tools integration (Dexguard and External Proguard).
|
|
|
|
// If enabled, the plugin will try to consume and upload the mapping file produced by Dexguard and External Proguard.
|
|
|
|
// Default is disabled.
|
2022-10-18 14:00:10 +00:00
|
|
|
experimentalGuardsquareSupport = hasSentryConfig
|
2022-09-14 00:14:52 +00:00
|
|
|
|
|
|
|
// Disables or enables the automatic configuration of Native Symbols
|
|
|
|
// for Sentry. This executes sentry-cli automatically so
|
|
|
|
// you don't need to do it manually.
|
|
|
|
// Default is disabled.
|
2022-10-06 12:06:43 +00:00
|
|
|
uploadNativeSymbols = hasSentryConfig
|
2022-09-14 00:14:52 +00:00
|
|
|
|
|
|
|
// Does or doesn't include the source code of native code for Sentry.
|
|
|
|
// This executes sentry-cli with the --include-sources param. automatically so
|
|
|
|
// you don't need to do it manually.
|
|
|
|
// Default is disabled.
|
2022-10-18 14:00:10 +00:00
|
|
|
includeNativeSources = hasSentryConfig
|
2022-09-14 00:14:52 +00:00
|
|
|
|
|
|
|
// Enable or disable the tracing instrumentation.
|
|
|
|
// Does auto instrumentation for specified features through bytecode manipulation.
|
|
|
|
// Default is enabled.
|
|
|
|
tracingInstrumentation {
|
2022-12-11 02:36:21 +00:00
|
|
|
enabled = true
|
2022-09-14 00:14:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations).
|
|
|
|
autoInstallation {
|
2022-12-17 02:19:42 +00:00
|
|
|
sentryVersion = '6.10.0'
|
2022-09-14 00:14:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-23 16:14:40 +00:00
|
|
|
configurations {
|
2022-09-14 00:14:52 +00:00
|
|
|
implementation.exclude group: 'org.jetbrains', module: 'annotations'
|
2021-10-23 16:14:40 +00:00
|
|
|
}
|
|
|
|
|
2021-10-01 20:19:42 +00:00
|
|
|
dependencies {
|
|
|
|
// UI
|
2022-09-14 00:14:52 +00:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.5.1'
|
2022-12-28 01:11:48 +00:00
|
|
|
implementation "androidx.activity:activity:1.7.0-alpha02"
|
2022-08-14 10:05:08 +00:00
|
|
|
implementation 'androidx.emoji2:emoji2:1.2.0'
|
|
|
|
implementation 'androidx.emoji2:emoji2-views-helper:1.2.0'
|
2022-01-31 21:59:47 +00:00
|
|
|
implementation 'androidx.preference:preference:1.2.0'
|
2022-06-01 11:59:49 +00:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2021-10-01 20:19:42 +00:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
|
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
2022-08-29 15:32:28 +00:00
|
|
|
implementation 'androidx.webkit:webkit:1.5.0'
|
2022-10-22 12:27:13 +00:00
|
|
|
implementation 'com.google.android.material:material:1.7.0'
|
2022-02-03 20:08:30 +00:00
|
|
|
implementation "dev.rikka.rikkax.layoutinflater:layoutinflater:1.2.0"
|
2022-07-16 14:13:58 +00:00
|
|
|
implementation "dev.rikka.rikkax.insets:insets:1.3.0"
|
2022-10-07 20:58:34 +00:00
|
|
|
implementation 'com.github.Dimezis:BlurView:version-2.0.2'
|
2022-06-03 15:26:57 +00:00
|
|
|
implementation 'com.github.KieronQuinn:MonetCompat:0.4.1'
|
2022-12-16 16:48:49 +00:00
|
|
|
implementation 'com.github.Fox2Code:FoxCompat:0.1.8'
|
2022-10-13 12:16:31 +00:00
|
|
|
// Update the version code in the root build.gradle
|
|
|
|
implementation "com.mikepenz:aboutlibraries:${latestAboutLibsRelease}"
|
2021-10-01 20:19:42 +00:00
|
|
|
|
|
|
|
// Utils
|
2022-07-20 13:25:58 +00:00
|
|
|
implementation 'androidx.work:work-runtime:2.7.1'
|
2022-12-17 02:19:42 +00:00
|
|
|
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.10'
|
2022-10-12 01:15:13 +00:00
|
|
|
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:5.0.0-alpha.10'
|
2022-12-09 19:42:18 +00:00
|
|
|
// Chromium cronet from androidacy
|
2022-12-16 16:48:49 +00:00
|
|
|
implementation 'com.androidacy:cronet-common:108.0.5359.125'
|
|
|
|
implementation 'com.androidacy:cronet-native:108.0.5359.125'
|
2022-12-07 20:38:55 +00:00
|
|
|
// Force prefer our own version of Cronet
|
2022-05-05 15:27:31 +00:00
|
|
|
implementation 'com.github.topjohnwu.libsu:io:5.0.1'
|
2022-09-14 00:14:52 +00:00
|
|
|
implementation 'com.github.Fox2Code:RosettaX:1.0.9'
|
2022-06-01 15:50:26 +00:00
|
|
|
implementation 'com.github.Fox2Code:AndroidANSI:1.0.1'
|
2022-12-17 02:19:42 +00:00
|
|
|
implementation 'io.sentry:sentry-android:6.10.0'
|
2022-09-14 00:14:52 +00:00
|
|
|
|
2021-10-01 20:19:42 +00:00
|
|
|
// 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"
|
2021-10-23 16:14:40 +00:00
|
|
|
implementation "io.noties.markwon:syntax-highlight:4.6.2"
|
2022-12-07 20:38:55 +00:00
|
|
|
implementation 'com.google.net.cronet:cronet-okhttp:0.1.0'
|
2021-10-23 16:14:40 +00:00
|
|
|
annotationProcessor "io.noties:prism4j-bundler:2.0.0"
|
2021-10-01 20:19:42 +00:00
|
|
|
implementation "com.caverock:androidsvg:1.4"
|
2022-12-13 02:30:55 +00:00
|
|
|
// Icons
|
|
|
|
// implementation "com.mikepenz:iconics-core:3.2.5"
|
|
|
|
//implementation "androidx.appcompat:appcompat:${versions.appCompat}"
|
2021-10-01 20:19:42 +00:00
|
|
|
|
2022-12-13 02:30:55 +00:00
|
|
|
// implementation 'com.mikepenz:community-material-typeface:7.0.96.0-kotlin@aar'
|
2021-10-01 20:19:42 +00:00
|
|
|
// Test
|
2022-10-12 01:15:13 +00:00
|
|
|
testImplementation 'junit:junit:4.13.2'
|
2022-11-26 02:00:30 +00:00
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
|
2022-04-02 10:43:30 +00:00
|
|
|
}
|
2022-10-06 12:06:43 +00:00
|
|
|
|
|
|
|
if (hasSentryConfig) {
|
2022-10-12 01:15:13 +00:00
|
|
|
Properties properties = new Properties()
|
2022-10-06 12:06:43 +00:00
|
|
|
try (FileInputStream fis = new FileInputStream(sentryConfigFile)) {
|
|
|
|
properties.load(fis)
|
|
|
|
}
|
|
|
|
tasks.withType(Exec) {
|
|
|
|
environment "SENTRY_PROJECT", properties.getProperty("defaults.project")
|
|
|
|
environment "SENTRY_ORG", properties.getProperty("defaults.org")
|
|
|
|
environment "SENTRY_URL", properties.getProperty("defaults.url")
|
|
|
|
environment "SENTRY_AUTH_TOKEN", properties.getProperty("auth.token")
|
|
|
|
}
|
2022-10-18 14:00:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2022-12-17 02:19:42 +00:00
|
|
|
ndkVersion '25.1.8937393'
|
|
|
|
dependenciesInfo {
|
|
|
|
includeInApk false
|
|
|
|
includeInBundle false
|
|
|
|
}
|
2022-10-18 14:00:10 +00:00
|
|
|
}
|
2022-12-15 09:00:28 +00:00
|
|
|
|
|
|
|
// Safeguard (Do not remove)
|
|
|
|
final File res = new File(projectDir, "src/main/res")
|
|
|
|
for (String name : res.list()) {
|
|
|
|
// Character.isDigit is required to make sure
|
|
|
|
// we don't confuse "values-vi" as "values-v69"
|
|
|
|
if (name.startsWith("values-v") &&
|
|
|
|
Character.isDigit(name.charAt(8))) {
|
|
|
|
final String ext = name + "/strings.xml"
|
|
|
|
if (new File(res, ext).exists()) {
|
|
|
|
final String errMessage =
|
|
|
|
"String should not be defined in " + ext +
|
|
|
|
" use values/strings.xml instead"
|
|
|
|
println(errMessage)
|
|
|
|
throw new GradleException(errMessage)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|