diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 000000000..d3b32f346 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,33 @@ +name: Android CI + +on: + push: + branches: [ "margarita" ] + pull_request: + branches: [ "margarita" ] + + + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: set up JDK + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew assembleDebug #build + - uses: actions/upload-artifact@v4 + with: + name: my-artifact + path: '**/*.apk' + diff --git a/android/build.gradle b/android/build.gradle index 6ff0b1e6d..b7ff4f649 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -14,10 +14,12 @@ android { versionCode appVersionCode versionName appVersionName + //noinspection MinSdkTooLow minSdkVersion appAndroidMinSDK targetSdkVersion appAndroidTargetSDK + multiDexEnabled true resourceConfigurations += ['en_US', 'cs', 'de', 'el', 'es', 'fr', 'hu', 'in', 'it', 'ja', 'ko', 'nl', 'pl', 'pt', 'ru', 'tr', 'uk', 'vi', 'zh_CN'] } @@ -37,9 +39,9 @@ android { //This makes release APKs smaller and more efficient, but also makes debugging trickier //as the information produced in stack traces must be de-obfuscated. //See here: https://developer.android.com/studio/build/shrink-code#decode-stack-trace - shrinkResources true - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + // shrinkResources true + // minifyEnabled true + // proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' dependencies { releaseImplementation project(':services:updates:githubUpdates') @@ -54,7 +56,9 @@ android { } } } - +dependencies { + implementation "androidx.multidex:multidex:2.0.1" +} configurations { natives } dependencies { @@ -125,3 +129,7 @@ task copyAndroidNatives() { // jvmTarget = "1.8" // } //} +dependencies { + def multidex_version = "2.0.1" + implementation "androidx.multidex:multidex:$multidex_version" +} diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index f08afa88e..a37e72bed 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -29,7 +29,8 @@ android:resizeableActivity="true" android:allowBackup="true" android:fullBackupOnly="true" - android:backupAgent=".AndroidBackupHandler"> + android:backupAgent=".AndroidBackupHandler" + android:name="androidx.multidex.MultiDexApplication" >