mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
fix building
This commit is contained in:
parent
2ca581495e
commit
fee58e6eac
415 changed files with 122 additions and 108 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,7 +5,6 @@ project.properties
|
||||||
.settings
|
.settings
|
||||||
bin/
|
bin/
|
||||||
gen/
|
gen/
|
||||||
gplay/
|
|
||||||
.idea/
|
.idea/
|
||||||
*.iml
|
*.iml
|
||||||
*.so
|
*.so
|
||||||
|
@ -45,3 +44,5 @@ jni/x86_64
|
||||||
jni/armeabi
|
jni/armeabi
|
||||||
jni/armeabi-v7a
|
jni/armeabi-v7a
|
||||||
jni/arm64-v8a
|
jni/arm64-v8a
|
||||||
|
|
||||||
|
*~
|
|
@ -40,8 +40,8 @@
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
|
|
||||||
<!-- force compiling emojipicker on sdk<21 and firebase on sdk<19; runtime checks are required then -->
|
<!-- force compiling emojipicker on sdk<21; runtime checks are required then -->
|
||||||
<uses-sdk tools:overrideLibrary="androidx.emoji2.emojipicker, com.google.firebase.messaging, com.google.android.gms.cloudmessaging"/>
|
<uses-sdk tools:overrideLibrary="androidx.emoji2.emojipicker"/>
|
||||||
|
|
||||||
<application android:name=".ApplicationContext"
|
<application android:name=".ApplicationContext"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
@ -57,10 +57,6 @@
|
||||||
android:hasFragileUserData="true"
|
android:hasFragileUserData="true"
|
||||||
>
|
>
|
||||||
|
|
||||||
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
|
|
||||||
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
|
|
||||||
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="false" />
|
|
||||||
|
|
||||||
<!-- android car support, see https://developer.android.com/training/auto/start/,
|
<!-- android car support, see https://developer.android.com/training/auto/start/,
|
||||||
as this potentially blocks releases on gplay due to extra-checks,
|
as this potentially blocks releases on gplay due to extra-checks,
|
||||||
we disable this during the first gplay releases -->
|
we disable this during the first gplay releases -->
|
||||||
|
@ -381,12 +377,6 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<service android:name=".notifications.FcmReceiveService" android:exported="true">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
|
||||||
</intent-filter>
|
|
||||||
</service>
|
|
||||||
|
|
||||||
<receiver android:name=".notifications.MarkReadReceiver"
|
<receiver android:name=".notifications.MarkReadReceiver"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="false">
|
android:exported="false">
|
||||||
|
@ -441,12 +431,6 @@
|
||||||
|
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
<provider
|
|
||||||
android:name="com.google.firebase.provider.FirebaseInitProvider"
|
|
||||||
android:authorities="${applicationId}.firebaseinitprovider"
|
|
||||||
tools:node="remove">
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<receiver android:name=".service.BootReceiver"
|
<receiver android:name=".service.BootReceiver"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
272
build.gradle
272
build.gradle
|
@ -14,6 +14,137 @@ repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace "org.thoughtcrime.securesms"
|
||||||
|
flavorDimensions "none"
|
||||||
|
compileSdk 34
|
||||||
|
|
||||||
|
// Set NDK version to strip native libraries.
|
||||||
|
// Even though we compile our libraries outside Gradle with `scripts/ndk-make.sh`,
|
||||||
|
// without ndkVersion `./gradlew clean` followed by `./gradlew assembleDebug --warning-mode=all` emits the following warning:
|
||||||
|
// > Task :stripFatDebugDebugSymbols
|
||||||
|
// Unable to strip the following libraries, packaging them as they are: libanimation-decoder-gif.so, libnative-utils.so.
|
||||||
|
// See <https://issuetracker.google.com/issues/237187538> for details.
|
||||||
|
ndkVersion "23.2.8568313"
|
||||||
|
useLibrary 'org.apache.http.legacy'
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
versionCode 685
|
||||||
|
versionName "1.46.2"
|
||||||
|
|
||||||
|
applicationId "com.b44t.messenger"
|
||||||
|
multiDexEnabled true
|
||||||
|
|
||||||
|
minSdkVersion 16
|
||||||
|
targetSdkVersion 33
|
||||||
|
|
||||||
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
|
// base name of the generated apk
|
||||||
|
project.ext.set("archivesBaseName", "deltachat");
|
||||||
|
|
||||||
|
buildConfigField "boolean", "DEV_BUILD", "false"
|
||||||
|
|
||||||
|
ndk {
|
||||||
|
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
||||||
|
}
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
buildConfigField("String", "TEST_ADDR", buildConfigProperty("TEST_ADDR"))
|
||||||
|
buildConfigField("String", "TEST_MAIL_PW", buildConfigProperty("TEST_MAIL_PW"))
|
||||||
|
buildConfigField("String", "NDK_ARCH", getNdkArch())
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
packagingOptions {
|
||||||
|
jniLibs {
|
||||||
|
keepDebugSymbols += ['*/mips/*.so', '*/mips64/*.so']
|
||||||
|
}
|
||||||
|
resources {
|
||||||
|
excludes += ['LICENSE.txt', 'LICENSE', 'NOTICE', 'asm-license.txt', 'META-INF/LICENSE', 'META-INF/NOTICE']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
debug {
|
||||||
|
// add `DC_DEBUG_STORE_FILE=/path/to/debug.keystore` to `~/.gradle/gradle.properties`
|
||||||
|
if(project.hasProperty("DC_DEBUG_STORE_FILE" )) {
|
||||||
|
storeFile file(DC_DEBUG_STORE_FILE )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
release {
|
||||||
|
// can be defined at `~/.gradle/gradle.properties` or at "Build/Generate signed APK"
|
||||||
|
if(project.hasProperty("DC_RELEASE_STORE_FILE")) {
|
||||||
|
storeFile file(DC_RELEASE_STORE_FILE)
|
||||||
|
storePassword DC_RELEASE_STORE_PASSWORD
|
||||||
|
keyAlias DC_RELEASE_KEY_ALIAS
|
||||||
|
keyPassword DC_RELEASE_KEY_PASSWORD
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
minifyEnabled false
|
||||||
|
applicationIdSuffix ".beta"
|
||||||
|
}
|
||||||
|
release {
|
||||||
|
// minification and proguard disabled for now.
|
||||||
|
//
|
||||||
|
// when enabled, it can cut down apk size about 6%,
|
||||||
|
// however this also has the potential to break things.
|
||||||
|
// so exceptions are needed and have to be maintained.
|
||||||
|
// (see git-history and https://github.com/deltachat/deltachat-android/issues/905 )
|
||||||
|
//
|
||||||
|
// nb: it is highly recommended to use the same settings in debug+release -
|
||||||
|
// otherwise problems might be noticed delayed only
|
||||||
|
minifyEnabled false
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
productFlavors {
|
||||||
|
fat {
|
||||||
|
dimension "none"
|
||||||
|
}
|
||||||
|
gplay {
|
||||||
|
dimension "none"
|
||||||
|
applicationId "chat.delta"
|
||||||
|
apply plugin: "com.google.gms.google-services"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
android.applicationVariants.all { variant ->
|
||||||
|
variant.outputs.all {
|
||||||
|
outputFileName = outputFileName
|
||||||
|
.replace("deltachat-android", "deltachat")
|
||||||
|
.replace(".apk", "-${variant.versionName}.apk")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
|
res.srcDirs = ['res']
|
||||||
|
assets.srcDirs = ['assets']
|
||||||
|
jniLibs.srcDirs = ['libs']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lint {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
renderScript true
|
||||||
|
aidl true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'androidx.sharetarget:sharetarget:1.2.0'
|
implementation 'androidx.sharetarget:sharetarget:1.2.0'
|
||||||
implementation 'androidx.webkit:webkit:1.8.0'
|
implementation 'androidx.webkit:webkit:1.8.0'
|
||||||
|
@ -93,147 +224,6 @@ dependencies {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace "org.thoughtcrime.securesms"
|
|
||||||
flavorDimensions "none"
|
|
||||||
compileSdk 34
|
|
||||||
|
|
||||||
// Set NDK version to strip native libraries.
|
|
||||||
// Even though we compile our libraries outside Gradle with `scripts/ndk-make.sh`,
|
|
||||||
// without ndkVersion `./gradlew clean` followed by `./gradlew assembleDebug --warning-mode=all` emits the following warning:
|
|
||||||
// > Task :stripFatDebugDebugSymbols
|
|
||||||
// Unable to strip the following libraries, packaging them as they are: libanimation-decoder-gif.so, libnative-utils.so.
|
|
||||||
// See <https://issuetracker.google.com/issues/237187538> for details.
|
|
||||||
ndkVersion "23.2.8568313"
|
|
||||||
useLibrary 'org.apache.http.legacy'
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
versionCode 685
|
|
||||||
versionName "1.46.2"
|
|
||||||
|
|
||||||
applicationId "com.b44t.messenger"
|
|
||||||
multiDexEnabled true
|
|
||||||
|
|
||||||
minSdkVersion 16
|
|
||||||
targetSdkVersion 33
|
|
||||||
|
|
||||||
vectorDrawables.useSupportLibrary = true
|
|
||||||
|
|
||||||
// base name of the generated apk
|
|
||||||
project.ext.set("archivesBaseName", "deltachat");
|
|
||||||
|
|
||||||
buildConfigField "boolean", "DEV_BUILD", "false"
|
|
||||||
buildConfigField "boolean", "USE_PLAY_SERVICES", "false"
|
|
||||||
|
|
||||||
ndk {
|
|
||||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
|
||||||
}
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
|
|
||||||
buildConfigField("String", "TEST_ADDR", buildConfigProperty("TEST_ADDR"))
|
|
||||||
buildConfigField("String", "TEST_MAIL_PW", buildConfigProperty("TEST_MAIL_PW"))
|
|
||||||
buildConfigField("String", "NDK_ARCH", getNdkArch())
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
packagingOptions {
|
|
||||||
jniLibs {
|
|
||||||
keepDebugSymbols += ['*/mips/*.so', '*/mips64/*.so']
|
|
||||||
}
|
|
||||||
resources {
|
|
||||||
excludes += ['LICENSE.txt', 'LICENSE', 'NOTICE', 'asm-license.txt', 'META-INF/LICENSE', 'META-INF/NOTICE']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
signingConfigs {
|
|
||||||
debug {
|
|
||||||
// add `DC_DEBUG_STORE_FILE=/path/to/debug.keystore` to `~/.gradle/gradle.properties`
|
|
||||||
if(project.hasProperty("DC_DEBUG_STORE_FILE" )) {
|
|
||||||
storeFile file(DC_DEBUG_STORE_FILE )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
release {
|
|
||||||
// can be defined at `~/.gradle/gradle.properties` or at "Build/Generate signed APK"
|
|
||||||
if(project.hasProperty("DC_RELEASE_STORE_FILE")) {
|
|
||||||
storeFile file(DC_RELEASE_STORE_FILE)
|
|
||||||
storePassword DC_RELEASE_STORE_PASSWORD
|
|
||||||
keyAlias DC_RELEASE_KEY_ALIAS
|
|
||||||
keyPassword DC_RELEASE_KEY_PASSWORD
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
debug {
|
|
||||||
minifyEnabled false
|
|
||||||
applicationIdSuffix ".beta"
|
|
||||||
}
|
|
||||||
release {
|
|
||||||
// minification and proguard disabled for now.
|
|
||||||
//
|
|
||||||
// when enabled, it can cut down apk size about 6%,
|
|
||||||
// however this also has the potential to break things.
|
|
||||||
// so exceptions are needed and have to be maintained.
|
|
||||||
// (see git-history and https://github.com/deltachat/deltachat-android/issues/905 )
|
|
||||||
//
|
|
||||||
// nb: it is highly recommended to use the same settings in debug+release -
|
|
||||||
// otherwise problems might be noticed delayed only
|
|
||||||
minifyEnabled false
|
|
||||||
signingConfig signingConfigs.release
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
productFlavors {
|
|
||||||
fat {
|
|
||||||
dimension "none"
|
|
||||||
}
|
|
||||||
gplay {
|
|
||||||
dimension "none"
|
|
||||||
applicationId "chat.delta"
|
|
||||||
apply plugin: "com.google.gms.google-services"
|
|
||||||
buildConfigField "boolean", "USE_PLAY_SERVICES", "true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android.applicationVariants.all { variant ->
|
|
||||||
variant.outputs.all {
|
|
||||||
outputFileName = outputFileName
|
|
||||||
.replace("deltachat-android", "deltachat")
|
|
||||||
.replace(".apk", "-${variant.versionName}.apk")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
|
||||||
java.srcDirs = ['src']
|
|
||||||
resources.srcDirs = ['src']
|
|
||||||
aidl.srcDirs = ['src']
|
|
||||||
renderscript.srcDirs = ['src']
|
|
||||||
res.srcDirs = ['res']
|
|
||||||
assets.srcDirs = ['assets']
|
|
||||||
jniLibs.srcDirs = ['libs']
|
|
||||||
}
|
|
||||||
androidTest {
|
|
||||||
java.srcDirs = ['androidTest']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lint {
|
|
||||||
abortOnError false
|
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
renderScript true
|
|
||||||
aidl true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
String buildConfigProperty(String name) {
|
String buildConfigProperty(String name) {
|
||||||
return "\"${propertyOrEmpty(name)}\""
|
return "\"${propertyOrEmpty(name)}\""
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.thoughtcrime.securesms.notifications;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
public class FcmReceiveService {
|
||||||
|
public static void register(Context context) {}
|
||||||
|
public static void waitForRegisterFinished() {}
|
||||||
|
public static void deleteToken() {}
|
||||||
|
@Nullable public static String getToken() { return null; }
|
||||||
|
}
|
28
src/gplay/AndroidManifest.xml
Normal file
28
src/gplay/AndroidManifest.xml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<!-- force compiling emojipicker on sdk<21 and firebase on sdk<19; runtime checks are required then -->
|
||||||
|
<uses-sdk tools:overrideLibrary="androidx.emoji2.emojipicker, com.google.firebase.messaging, com.google.android.gms.cloudmessaging"/>
|
||||||
|
|
||||||
|
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
|
||||||
|
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
|
||||||
|
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="false" />
|
||||||
|
|
||||||
|
<application>
|
||||||
|
<service
|
||||||
|
android:name=".notifications.FcmReceiveService"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="com.google.firebase.provider.FirebaseInitProvider"
|
||||||
|
android:authorities="${applicationId}.firebaseinitprovider"
|
||||||
|
tools:node="remove">
|
||||||
|
</provider>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue