Updated build tools

master
M66B 2 months ago
parent 80e898efd2
commit e58616dd50

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="21" />
<bytecodeTargetLevel target="17" />
</component>
</project>

@ -1,6 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'de.undercouch.download'
plugins {
id 'com.android.application'
id 'de.undercouch.download'
}
def getVersionCode = { -> return 2315 }
def getRevision = { -> return "a" }
@ -100,11 +101,12 @@ android {
// https://developer.android.com/studio/write/java8-support#groovy
// sudo update-alternatives --install /usr/bin/java java /usr/local/android-studio/jbr/bin/java 1
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
externalNativeBuild {
@ -177,7 +179,7 @@ android {
release {
debuggable = false
minifyEnabled = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig = signingConfigs.release
buildConfigField "String", "TX_URI", "\"\""
buildConfigField "String", "GPA_URI", "\"\""
@ -188,7 +190,7 @@ android {
applicationIdSuffix '.debug'
debuggable = true
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", "TX_URI", localProperties.getProperty("paypal.uri", "\"\"")
buildConfigField "String", "GPA_URI", localProperties.getProperty("gpa.uri", "\"\"")
buildConfigField "String", "INFO_URI", localProperties.getProperty("info.uri", "\"\"")
@ -348,42 +350,18 @@ android {
}
}
variantFilter { variant ->
def flavors = variant.flavors*.name
// Builds: release, debug
// Flavors: github, large, fdroid, play
if (variant.buildType.name == "debug" &&
(flavors.contains("amazon") ||
flavors.contains("fdroid") ||
flavors.contains("large") ||
flavors.contains("play"))) {
setIgnore(true)
androidComponents {
beforeVariants(selector().all()) { variantBuilder ->
def flavors = variantBuilder.productFlavors.collect { it.second }
if (variantBuilder.buildType == "debug" &&
(flavors.contains("amazon") ||
flavors.contains("fdroid") ||
flavors.contains("large") ||
flavors.contains("play"))) {
variantBuilder.enable = false
}
}
}
// https://stackoverflow.com/questions/28948538/
applicationVariants.configureEach { variant ->
if (variant.buildType.name == "debug")
variant.buildConfigField "String", "MXTOOLBOX_URI", "\"https://mxtoolbox.com\""
else
variant.buildConfigField "String", "MXTOOLBOX_URI", "\"\""
//if (variant.getBuildType().isMinifyEnabled())
// variant.assembleProvider.get().doLast {
// for (file in variant.getMappingFileProvider().get().files)
// if (file != null && file.exists()) {
// def dir = "${rootDir}/app/schemas/mapping"
// def name = "$archivesBaseName-$variant.baseName-$file.name"
// def target = new File(dir, name)
// if (!target.exists())
// copy {
// from file
// into dir
// rename { String fileName -> name }
// }
// }
// }
}
}
tasks.register('copyMarkdown', Copy) {
@ -487,14 +465,6 @@ tasks.register('upload', Exec) {
"filename=FairEmail-v1." + getVersionCode() + getRevision() + "-" + target + "-release.apk"
}
repositories {
google()
mavenCentral()
maven { url = "https://jitpack.io" }
//maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
//maven { url "https://jakarta.oss.sonatype.org/content/repositories/snapshots/" }
}
configurations.configureEach {
// Workaround https://issuetracker.google.com/issues/138441698
// Support @69c481c39a17d4e1e44a4eb298bb81c48f226eef

@ -116,7 +116,6 @@
android:backupAgent=".FairEmailBackupAgent"
android:dataExtractionRules="@xml/data_extraction_rules"
android:description="@string/app_name"
android:extractNativeLibs="true"
android:forceDarkAllowed="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"

@ -125,7 +125,6 @@
android:backupAgent=".FairEmailBackupAgent"
android:dataExtractionRules="@xml/data_extraction_rules"
android:description="@string/app_name"
android:extractNativeLibs="true"
android:forceDarkAllowed="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"

@ -124,7 +124,6 @@
android:backupAgent=".FairEmailBackupAgent"
android:dataExtractionRules="@xml/data_extraction_rules"
android:description="@string/app_name"
android:extractNativeLibs="true"
android:forceDarkAllowed="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"

@ -124,7 +124,6 @@
android:backupAgent=".FairEmailBackupAgent"
android:dataExtractionRules="@xml/data_extraction_rules"
android:description="@string/app_name"
android:extractNativeLibs="true"
android:forceDarkAllowed="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"

@ -124,7 +124,6 @@
android:backupAgent=".FairEmailBackupAgent"
android:dataExtractionRules="@xml/data_extraction_rules"
android:description="@string/app_name"
android:extractNativeLibs="true"
android:forceDarkAllowed="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"

@ -116,7 +116,6 @@
android:backupAgent=".FairEmailBackupAgent"
android:dataExtractionRules="@xml/data_extraction_rules"
android:description="@string/app_name"
android:extractNativeLibs="true"
android:forceDarkAllowed="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"

@ -672,7 +672,7 @@ public abstract class SelectionTracker<K> {
*
* @param toolTypes the tool types to be used
* @return this
* @deprecated GestureSelection is best bound to {@link MotionEvent#TOOL_TYPE_FINGER},
* deprecated GestureSelection is best bound to {@link MotionEvent#TOOL_TYPE_FINGER},
* and only that tool type. This method will be removed in a future release.
*/
//@Deprecated
@ -710,7 +710,7 @@ public abstract class SelectionTracker<K> {
*
* @param toolTypes the tool types to be used
* @return this
* @deprecated PointerSelection is best bound to {@link MotionEvent#TOOL_TYPE_MOUSE},
* deprecated PointerSelection is best bound to {@link MotionEvent#TOOL_TYPE_MOUSE},
* and only that tool type. This method will be removed in a future release.
*/
//@Deprecated

@ -331,23 +331,6 @@ public class DnsBlockList {
return null;
}
static void show(Context context, String received) {
String host = DnsBlockList.getFromHost(MimeUtility.unfold(received));
if (host == null)
return;
if (host.startsWith("[") && host.endsWith("]"))
host = host.substring(1, host.length() - 1);
Uri uri = Uri.parse(BuildConfig.MXTOOLBOX_URI)
.buildUpon()
.appendPath("/SuperTool.aspx")
.appendQueryParameter("action", "blacklist:" + host)
.appendQueryParameter("run", "toolpage")
.build();
Helper.view(context, uri, true);
}
private static class CacheEntry {
private final long time;
private final boolean blocked;

@ -3180,17 +3180,6 @@ public class HtmlHelper {
ssb.append(" \uFFFC"); // Object replacement character
ssb.setSpan(new ImageSpan(d), ssb.length() - 1, ssb.length(), 0);
if (!TextUtils.isEmpty(BuildConfig.MXTOOLBOX_URI)) {
final String header = received[i];
ClickableSpan click = new ClickableSpan() {
@Override
public void onClick(@NonNull View widget) {
DnsBlockList.show(widget.getContext(), header);
}
};
ssb.setSpan(click, ssb.length() - 1, ssb.length(), 0);
}
}
ssb.append('\n');

@ -209,7 +209,7 @@ public class ActivationDataFlavor /*extends DataFlavor*/ {
* @param parameterName the parameter name
* @param parameterValue the parameter value
* @return the normalized parameter value
* @deprecated
* deprecated
*/
protected String normalizeMimeTypeParameter(String parameterName,
String parameterValue) {
@ -226,7 +226,7 @@ public class ActivationDataFlavor /*extends DataFlavor*/ {
*
* @param mimeType the MIME type
* @return the normalized MIME type
* @deprecated
* deprecated
*/
protected String normalizeMimeType(String mimeType) {
return mimeType;

@ -114,7 +114,6 @@
android:backupAgent=".FairEmailBackupAgent"
android:dataExtractionRules="@xml/data_extraction_rules"
android:description="@string/app_name"
android:extractNativeLibs="true"
android:forceDarkAllowed="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"

@ -1,28 +1,9 @@
buildscript {
repositories {
google()
mavenCentral()
maven { url = "https://jitpack.io" }
}
dependencies {
// https://developer.android.com/studio/releases/gradle-plugin
classpath 'com.android.tools.build:gradle:8.13.2'
// https://kotlinlang.org/docs/releases.html#release-details
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.21"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:2.1.21"
// https://plugins.gradle.org/plugin/de.undercouch.download
classpath "de.undercouch:gradle-download-task:5.6.0"
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url = "https://jitpack.io" }
}
plugins {
// https://developer.android.com/studio/releases/gradle-plugin
id 'com.android.application' version '9.2.0' apply false
//id 'com.android.library' version '9.2.0' apply false
// https://plugins.gradle.org/plugin/de.undercouch.download
id 'de.undercouch.download' version '5.6.0' apply false
}
tasks.register('clean', Delete) {

@ -13,7 +13,7 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

@ -20,4 +20,18 @@ android.nonTransitiveRClass=true
android.nonFinalResIds=true
# https://issuetracker.google.com/issues/332788833
android.javaCompile.suppressSourceTargetDeprecationWarning=true
android.javaCompile.suppressSourceTargetDeprecationWarning=true
android.r8.strictFullModeForKeepRules=true
android.r8.optimizedResourceShrinking=true
#android.defaults.buildfeatures.resvalues=true
#android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
#android.enableAppCompileTimeRClass=false
#android.onlyEnableUnitTestForTheTestedBuildType=false
#android.usesSdkInManifest.disallowed=false
#android.uniquePackageNames=false
#android.dependency.useConstraints=true
#android.r8.strictFullModeForKeepRules=false
#android.r8.optimizedResourceShrinking=false
#android.builtInKotlin=false
#android.newDsl=false

@ -4,5 +4,5 @@ distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#https://docs.gradle.org/current/userguide/gradle_wrapper.html
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-all.zip
#distributionSha256Sum=23e7d37e9bb4f8dabb8a3ea7fdee9dd0428b9b1a71d298aefd65b11dccea220f

@ -1,3 +1,26 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = "https://jitpack.io" }
}
}
rootProject.name = "email"
include ':app', ':colorpicker', ':openpgp-api'
project(':colorpicker').projectDir = new File('colorpicker')
project(':openpgp-api').projectDir = new File('openpgp-api')

Loading…
Cancel
Save