diff --git a/build/android/Makefile b/build/android/Makefile index c70163c34..5bcee2760 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -652,7 +652,7 @@ apk: local.properties $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) $(LUAJIT_LIB) fi; \ export VERSION_STR="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" && \ export BUILD_TYPE_C=$$(echo "$${BUILD_TYPE}" | sed 's/./\U&/') && \ -# gradle assemble$$BUILD_TYPE_C && \ + ./gradlew assemble$$BUILD_TYPE_C && \ echo "APK stored at: build/outputs/apk/MultiCraft-$$BUILD_TYPE.apk" && \ echo "You can install it with \`make install_$$BUILD_TYPE\`" @@ -671,7 +671,7 @@ prep_srcdir : fi clean_apk : -# gradle clean + ./gradlew clean clean_all : @$(MAKE) clean_apk; \ diff --git a/build/android/build.gradle b/build/android/build.gradle index 09495b2ea..533b32c58 100644 --- a/build/android/build.gradle +++ b/build/android/build.gradle @@ -1,24 +1,21 @@ buildscript { repositories { + maven { url 'https://maven.google.com' } jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.1.3' } } allprojects { repositories { + maven { url 'https://maven.google.com' } jcenter() } } -task clean(type: Delete) { - delete rootProject.buildDir -} - apply plugin: 'com.android.application' - android { compileSdkVersion 27 buildToolsVersion "27.0.3" @@ -27,6 +24,7 @@ android { applicationId "mobi.MultiCraft" minSdkVersion 16 targetSdkVersion 27 + versionCode 92 } Properties props = new Properties() props.load(new FileInputStream(file("local.properties"))) @@ -41,8 +39,10 @@ android { } } - buildTypes { - release { + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig signingConfigs.release } } @@ -73,7 +73,5 @@ android.applicationVariants.all { variant -> } dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:support-compat:27.1.1' } - diff --git a/build/android/gradle/wrapper/gradle-wrapper.jar b/build/android/gradle/wrapper/gradle-wrapper.jar index 8c0fb64a8..f6b961fd5 100644 Binary files a/build/android/gradle/wrapper/gradle-wrapper.jar and b/build/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/build/android/gradle/wrapper/gradle-wrapper.properties b/build/android/gradle/wrapper/gradle-wrapper.properties index 980438b75..9a4163a4f 100644 --- a/build/android/gradle/wrapper/gradle-wrapper.properties +++ b/build/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sat Aug 27 20:10:09 CEST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 9937e2b95..6fe763be3 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -44,17 +44,6 @@ ifdef GPROF GPROF_DEF=-DGPROF endif -LOCAL_CFLAGS := \ - -DJSONCPP_NO_LOCALE_SUPPORT \ - -DHAVE_TOUCHSCREENGUI \ - -DUSE_CURL=1 \ - -DUSE_SOUND=1 \ - -DUSE_FREETYPE=1 \ - -DUSE_GETTEXT=1 \ - -DUSE_LEVELDB=1 \ - $(GPROF_DEF) \ - -pipe - ifeq ($(TARGET_ABI),armeabi-v7a) LOCAL_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb endif @@ -67,6 +56,17 @@ ifndef NDEBUG LOCAL_CFLAGS := -g -D_DEBUG -O0 -fno-omit-frame-pointer endif +LOCAL_CFLAGS := \ + -DJSONCPP_NO_LOCALE_SUPPORT \ + -DHAVE_TOUCHSCREENGUI \ + -DUSE_CURL=1 \ + -DUSE_SOUND=1 \ + -DUSE_FREETYPE=1 \ + -DUSE_GETTEXT=1 \ + -DUSE_LEVELDB=1 \ + $(GPROF_DEF) \ + -pipe + ifdef GPROF PROFILER_LIBS := android-ndk-profiler LOCAL_CFLAGS += -pg diff --git a/build/android/settings.gradle b/build/android/settings.gradle deleted file mode 100644 index 5eb5b931d..000000000 --- a/build/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "MultiCraft"