Fix APK build Part1

This commit is contained in:
Maksim Gamarnik 2016-10-19 03:14:10 +03:00
parent c9f51e805c
commit 4782ad207a
3 changed files with 37 additions and 8 deletions

View File

@ -889,8 +889,6 @@ apk: local.properties $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) $(
export VERSION_STR="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" && \ export VERSION_STR="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" && \
export BUILD_TYPE_C=$$(echo "$${BUILD_TYPE}" | sed 's/./\U&/') && \ export BUILD_TYPE_C=$$(echo "$${BUILD_TYPE}" | sed 's/./\U&/') && \
gradle assemble$$BUILD_TYPE_C && \ gradle assemble$$BUILD_TYPE_C && \
echo " Success! =)"; \
ant $$BUILD_TYPE && \
echo "APK stored at: build/outputs/apk/MultiCraft-$$BUILD_TYPE.apk" && \ echo "APK stored at: build/outputs/apk/MultiCraft-$$BUILD_TYPE.apk" && \
echo "You can install it with \`make install_$$BUILD_TYPE\`" echo "You can install it with \`make install_$$BUILD_TYPE\`"

View File

@ -1,13 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
repositories { repositories {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.1.0' classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
} }
} }
@ -19,4 +15,40 @@ allprojects {
task clean(type: Delete) { task clean(type: Delete) {
delete rootProject.buildDir delete rootProject.buildDir
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "mobi.MultiCraft"
minSdkVersion 16
targetSdkVersion 24
}
Properties props = new Properties()
props.load(new FileInputStream(file("local.properties")))
if (props.getProperty("keystore") != null) {
signingConfigs {
release {
storeFile file(props["keystore"])
storePassword props["keystore.password"]
keyAlias props["key"]
keyPassword props["key.password"]
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
}
dependencies {
compile 'com.android.support:support-v4:24.2.0'
} }

View File

@ -1,2 +1 @@
rootProject.name = "MultiCraft" rootProject.name = "MultiCraft"