Android: update gradle, get precompiled deps as zip
This commit is contained in:
parent
a3ac5079fa
commit
fe4fe77ac2
@ -2,19 +2,21 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.3'
|
||||
ndkVersion '21.1.6352462'
|
||||
ndkVersion '21.2.6472646'
|
||||
defaultConfig {
|
||||
applicationId 'com.multicraft.game'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 43
|
||||
versionName "1.9.3"
|
||||
/*multiDexEnabled true
|
||||
useLibrary 'org.apache.http.legacy'*/
|
||||
versionCode 61
|
||||
versionName "1.9.4"
|
||||
/*multiDexEnabled true*/
|
||||
}
|
||||
|
||||
// load properties
|
||||
Properties props = new Properties()
|
||||
props.load(new FileInputStream(file('../local.properties')))
|
||||
def propfile = file('../local.properties')
|
||||
if (propfile.exists())
|
||||
props.load(new FileInputStream(propfile))
|
||||
|
||||
if (props.getProperty('keystore') != null) {
|
||||
signingConfigs {
|
||||
@ -51,17 +53,20 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/* MultiCraft Native */
|
||||
implementation project(':native')
|
||||
|
||||
/* Third-party libraries */
|
||||
/*implementation 'androidx.multidex:multidex:2.0.1'*/
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
// MultiCraft Native
|
||||
implementation project(':native')
|
||||
// Analytics libraries
|
||||
//noinspection GradleDynamicVersion
|
||||
/*implementation('com.bugsnag:bugsnag-android:4.+') {
|
||||
exclude group: 'com.bugsnag', module: 'bugsnag-plugin-android-ndk'
|
||||
}*/
|
||||
// Third-party libraries
|
||||
/*implementation 'gun0912.ted:tedpermission:2.2.3'*/
|
||||
//noinspection GradleDependency
|
||||
implementation 'commons-io:commons-io:2.5'
|
||||
/*implementation 'gun0912.ted:tedpermission:2.2.3'*/
|
||||
|
||||
/* Analytics libraries */
|
||||
//noinspection GradleDynamicVersion
|
||||
/*implementation('com.bugsnag:bugsnag-android:5.+') {
|
||||
exclude group: 'com.bugsnag', module: 'bugsnag-plugin-android-anr'
|
||||
exclude group: 'com.bugsnag', module: 'bugsnag-plugin-android-ndk'
|
||||
}*/
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.3'
|
||||
classpath 'com.android.tools.build:gradle:4.0.0'
|
||||
//noinspection GradleDynamicVersion
|
||||
/*classpath 'com.bugsnag:bugsnag-android-gradle-plugin:4.+'*/
|
||||
classpath 'org.ajoberstar.grgit:grgit-gradle:4.0.2'
|
||||
classpath 'de.undercouch:gradle-download-task:4.0.4'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#Wed Mar 25 23:38:28 CET 2020
|
||||
#Tue May 19 19:48:00 CEST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
|
||||
|
@ -1,16 +1,16 @@
|
||||
apply plugin: 'com.android.library'
|
||||
import org.ajoberstar.grgit.Grgit
|
||||
apply plugin: 'de.undercouch.download'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.3'
|
||||
ndkVersion '21.1.6352462'
|
||||
ndkVersion '21.2.6472646'
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments '-j8'
|
||||
arguments '-j' + Runtime.getRuntime().availableProcessors()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -41,28 +41,49 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
task cloneGitRepo() {
|
||||
def destination = file('deps')
|
||||
if(!destination.exists()) {
|
||||
def grgit = Grgit.clone(
|
||||
dir: destination,
|
||||
uri: 'https://github.com/MultiCraft/deps'
|
||||
)
|
||||
grgit.close()
|
||||
// get precompiled deps
|
||||
task downloadDeps(type: Download) {
|
||||
src 'https://github.com/MultiCraft/deps/archive/master.zip'
|
||||
dest new File(buildDir, 'deps.zip')
|
||||
overwrite false
|
||||
}
|
||||
|
||||
task getDeps(dependsOn: downloadDeps, type: Copy) {
|
||||
def deps = file('deps')
|
||||
def f = file("$buildDir/deps-master")
|
||||
|
||||
if (!f.exists()) {
|
||||
from zipTree(downloadDeps.dest)
|
||||
into buildDir
|
||||
}
|
||||
|
||||
doLast {
|
||||
file(f).renameTo(file(deps))
|
||||
}
|
||||
}
|
||||
|
||||
task clonelibiconv() {
|
||||
def destination = file('deps/Android/ndk_iconv')
|
||||
if(!destination.exists()) {
|
||||
def grgit = Grgit.clone(
|
||||
dir: destination,
|
||||
uri: 'https://github.com/MoNTE48/ndk_iconv',
|
||||
refToCheckout: 'mc'
|
||||
)
|
||||
grgit.close()
|
||||
// get libiconv
|
||||
task downloadIconv(type: Download) {
|
||||
src 'https://github.com/MoNTE48/ndk_iconv/archive/mc.zip'
|
||||
dest new File(buildDir, 'sqlite.zip')
|
||||
overwrite false
|
||||
}
|
||||
|
||||
task getIconv(dependsOn: downloadIconv, type: Copy) {
|
||||
def iconv = file('deps/Android/ndk_iconv')
|
||||
def f = file("$buildDir/ndk_iconv-mc")
|
||||
|
||||
if (!iconv.exists() && !f.exists()) {
|
||||
from zipTree(downloadIconv.dest)
|
||||
into buildDir
|
||||
}
|
||||
|
||||
doLast {
|
||||
if (!iconv.exists()) {
|
||||
file(f).renameTo(file(iconv))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
preBuild.dependsOn cloneGitRepo
|
||||
preBuild.dependsOn clonelibiconv
|
||||
preBuild.dependsOn getDeps
|
||||
preBuild.dependsOn getIconv
|
||||
|
Loading…
x
Reference in New Issue
Block a user