mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-09 07:16:04 -04:00
Upgrade to use API21 (for Lollipop)
This commit is contained in:
parent
58f1b5967a
commit
01e77fe167
@ -19,7 +19,7 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="9"
|
||||
android:targetSdkVersion="19"/>
|
||||
android:targetSdkVersion="21"/>
|
||||
<application
|
||||
android:icon="@drawable/kiwix_icon"
|
||||
android:label="@string/app_name"
|
||||
|
@ -144,7 +144,7 @@ NDK_PATH = os.environ.get('NDK_PATH',
|
||||
SDK_PATH = os.environ.get('ANDROID_HOME',
|
||||
os.path.join(os.path.dirname(CURRENT_PATH),
|
||||
'src', 'dependencies',
|
||||
'android-sdk', 'sdk'))
|
||||
'android-sdk'))
|
||||
|
||||
# Target Android EABI/version to compile for.
|
||||
# list of available platforms in <NDK_PATH>/platforms
|
||||
@ -297,7 +297,7 @@ for arch in ARCHS:
|
||||
% {'src': ln_src, 'dest': dest})
|
||||
|
||||
# add a link to android-support-v4.jar
|
||||
ln_src = '%(SDK_PATH)s/extras/android/support/v4/android-support-v4.jar' % {'SDK_PATH': SDK_PATH}
|
||||
ln_src = '%(SDK_PATH)s/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar' % {'SDK_PATH': SDK_PATH}
|
||||
dest = os.path.join(os.path.dirname(CURRENT_PATH), 'android', 'libs')
|
||||
syscall('ln -sf %(src)s %(dest)s/'
|
||||
% {'src': ln_src, 'dest': dest})
|
||||
@ -552,7 +552,7 @@ if COMPILE_APK:
|
||||
|
||||
# Compile java and build APK
|
||||
syscall('rm -f build/apk/*.apk', shell=True)
|
||||
syscall('./gradlew build')
|
||||
syscall('./gradlew build --stacktrace')
|
||||
|
||||
# Check that the step went well
|
||||
if not os.path.exists(os.path.join('build', 'apk', 'android-debug-unaligned.apk')):
|
||||
|
@ -16,19 +16,19 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:19.0.0'
|
||||
compile 'com.android.support:support-v4:19.1.0'
|
||||
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
|
||||
compile files("$buildDir/native-libs/native-libs.jar")
|
||||
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "19"
|
||||
compileSdkVersion 21
|
||||
buildToolsVersion "21.1.2"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 19
|
||||
targetSdkVersion 21
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
|
@ -17,11 +17,11 @@ function die {
|
||||
exit 1
|
||||
}
|
||||
|
||||
../src/dependencies/android-sdk/sdk/tools/android update project -p . -n Kiwix -t android-14
|
||||
../src/dependencies/android-sdk/tools/android update project -p . -n Kiwix -t android-14
|
||||
|
||||
jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore $CERTIFICATE build/apk/android-release-unsigned.apk kiwix || die "Error signing the package."
|
||||
jarsigner -verify build/apk/android-release-unsigned.apk || die "The package is not properly signed."
|
||||
../src/dependencies/android-sdk/sdk/tools/zipalign -f -v 4 build/apk/android-release-unsigned.apk kiwix-android.apk || die "Could not zipalign the signed package. Please check."
|
||||
../src/dependencies/android-sdk/tools/zipalign -f -v 4 build/apk/android-release-unsigned.apk kiwix-android.apk || die "Could not zipalign the signed package. Please check."
|
||||
|
||||
echo "[SUCCESS] Your signed release package is ready:"
|
||||
ls -lh kiwix-android.apk
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
if [ -f build/apk/android-debug-unaligned.apk ]
|
||||
then
|
||||
../src/dependencies/android-sdk/sdk/platform-tools/adb uninstall org.kiwix.kiwixmobile ;
|
||||
../src/dependencies/android-sdk/sdk/platform-tools/adb install build/apk/android-debug-unaligned.apk
|
||||
../src/dependencies/android-sdk/platform-tools/adb uninstall org.kiwix.kiwixmobile ;
|
||||
../src/dependencies/android-sdk/platform-tools/adb install build/apk/android-debug-unaligned.apk
|
||||
else
|
||||
echo "No APK file available!"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user