Migrate to AndroidX and build app bundle.
diff --git a/Makefile b/Makefile
index cb872aa..1085fd3 100644
--- a/Makefile
+++ b/Makefile
@@ -5,15 +5,15 @@
generate:
if [ -f jni/Makefile ]; then make -C jni generate; fi
debug: generate
- ./gradlew assembleDebug
+ ./gradlew --warning-mode=all assembleDebug bundleDebug
release: generate
- ./gradlew assembleRelease
+ ./gradlew --warning-mode=all assembleRelease bundleRelease
install: generate
- ./gradlew installDebug
+ ./gradlew --warning-mode=all installDebug
lint:
- ./gradlew lint
+ ./gradlew --warning-mode=all lint
archive: generate
- ./gradlew uploadArchives
+ ./gradlew --warning-mode=all uploadArchives
sync: archive
rsync -av MAVEN/com/ ghostscript.com:/var/www/maven.ghostscript.com/com/
diff --git a/app/build.gradle b/app/build.gradle
index 5c93439..9d282be 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -4,7 +4,7 @@
version = '1.16.1'
dependencies {
- implementation 'com.android.support:appcompat-v7:25.+'
+ implementation 'androidx.appcompat:appcompat:1.1.+'
if (file('../lib/build.gradle').isFile())
api project(':lib')
else
@@ -12,10 +12,10 @@
}
android {
- compileSdkVersion 26
+ compileSdkVersion 28
defaultConfig {
minSdkVersion 16
- targetSdkVersion 26
+ targetSdkVersion 28
versionName '1.16.1'
versionCode 70
}
@@ -27,13 +27,9 @@
}
}
- // Increment version code for each ABI variant
- def abiOffsets = [ 'armeabi-v7a':1, 'arm64-v8a':2, 'x86':3, 'x86_64':4, ]
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- def offset = abiOffsets.get(output.getFilter(com.android.build.OutputFile.ABI))
- if (offset != null)
- output.versionCodeOverride = variant.versionCode + offset
+ bundle {
+ abi {
+ enableSplit true
}
}
diff --git a/app/src/main/java/com/artifex/mupdf/viewer/app/LibraryActivity.java b/app/src/main/java/com/artifex/mupdf/viewer/app/LibraryActivity.java
index dd57166..88dac95 100644
--- a/app/src/main/java/com/artifex/mupdf/viewer/app/LibraryActivity.java
+++ b/app/src/main/java/com/artifex/mupdf/viewer/app/LibraryActivity.java
@@ -13,8 +13,8 @@
import android.widget.ArrayAdapter;
import android.widget.ListView;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.content.ContextCompat;
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
import java.io.File;
import java.io.FileFilter;
diff --git a/build.gradle b/build.gradle
index 99228c3..124f6ec 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,7 +4,7 @@
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.0'
+ classpath 'com.android.tools.build:gradle:3.4.2'
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 94173e9..d282b6b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
diff --git a/lib/build.gradle b/lib/build.gradle
index c01f381..fcddbf2 100644
--- a/lib/build.gradle
+++ b/lib/build.gradle
@@ -12,10 +12,10 @@
}
android {
- compileSdkVersion 26
+ compileSdkVersion 28
defaultConfig {
minSdkVersion 16
- targetSdkVersion 26
+ targetSdkVersion 28
}
}