2016-01-08 16:36:44 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2018-10-08 20:35:18 +00:00
|
|
|
google()
|
2016-01-08 16:36:44 +00:00
|
|
|
jcenter()
|
2017-10-06 09:08:57 +00:00
|
|
|
$$GRADLE_REPOSITORY_URLS$$
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
dependencies {
|
2019-08-27 08:19:07 +00:00
|
|
|
classpath 'com.android.tools.build:gradle:3.4.2'
|
2017-03-06 10:04:21 +00:00
|
|
|
$$GRADLE_CLASSPATH$$
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2018-01-11 19:24:11 +00:00
|
|
|
google()
|
2018-10-28 18:20:30 +00:00
|
|
|
jcenter()
|
2016-01-09 13:21:22 +00:00
|
|
|
$$GRADLE_REPOSITORY_URLS$$
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-12-03 21:46:43 +00:00
|
|
|
implementation "com.android.support:support-core-utils:28.0.0"
|
2016-06-25 11:39:03 +00:00
|
|
|
$$GRADLE_DEPENDENCIES$$
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
2018-12-03 21:46:43 +00:00
|
|
|
disable 'MissingTranslation','UnusedResources'
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
|
2018-12-03 21:46:43 +00:00
|
|
|
compileSdkVersion 28
|
2018-10-08 20:35:18 +00:00
|
|
|
buildToolsVersion "28.0.3"
|
Supporting Android API 23 (Android 6.0)
If we update build gradle to use ``compileSdkVersion 23``,
``org.apache.http`` package causes error. (issue #4711)
We need to use ``useLibrary 'org.apache.http.legacy'`` to solve this problem.
To use ``useLibrary``, we need to use latest gradle also.
And now, we faced another problem with ``APK Expansion`` java sources.
```
/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java
137 : mCurrentNotification.setLatestEventInfo(mContext, mCurrentTitle, mCurrentText, mContentIntent); // causes error
```
So, some of APK Expansion java sources are updated by referencing commits from https://github.com/danikula/Google-Play-Expansion-File
And dropped V3CustomNotification.java which was for android 3.0, since godot supports android 14 (4.0) above officially.
Unfortunately, another problem, The 'MissingTranslation' error was occurred.
So, build.gradle is updated to use ``disable 'MissingTranslation'``
Additionally, I updated ``buildToolsVersion``, ``targetSdkVersion`` to latest version.
I tested APK Expansion funtionality on Android 6.0 (Nexus 9, Nexus 6p) and Android 4.4 (Galaxy Note 2) with Google Developer console.
2016-05-20 13:57:49 +00:00
|
|
|
useLibrary 'org.apache.http.legacy'
|
2016-01-08 16:36:44 +00:00
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/NOTICE'
|
|
|
|
}
|
|
|
|
defaultConfig {
|
2016-07-06 19:03:50 +00:00
|
|
|
$$GRADLE_DEFAULT_CONFIG$$
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
2016-06-15 13:21:18 +00:00
|
|
|
// Both signing and zip-aligning will be done at export time
|
|
|
|
buildTypes.all { buildType ->
|
|
|
|
buildType.zipAlignEnabled false
|
|
|
|
buildType.signingConfig null
|
|
|
|
}
|
2016-01-08 16:36:44 +00:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
2016-01-08 20:55:13 +00:00
|
|
|
java.srcDirs = ['src'
|
2016-06-25 11:39:03 +00:00
|
|
|
$$GRADLE_JAVA_DIRS$$
|
2016-01-08 16:36:44 +00:00
|
|
|
]
|
2017-01-24 15:29:09 +00:00
|
|
|
res.srcDirs = [
|
2016-01-08 16:36:44 +00:00
|
|
|
'res'
|
2017-10-06 09:08:57 +00:00
|
|
|
$$GRADLE_RES_DIRS$$
|
2016-01-08 16:36:44 +00:00
|
|
|
]
|
|
|
|
aidl.srcDirs = [
|
|
|
|
'aidl'
|
2017-10-06 09:08:57 +00:00
|
|
|
$$GRADLE_AIDL_DIRS$$
|
2016-01-08 16:36:44 +00:00
|
|
|
]
|
|
|
|
assets.srcDirs = [
|
|
|
|
'assets'
|
2016-06-25 11:39:03 +00:00
|
|
|
$$GRADLE_ASSET_DIRS$$
|
2016-01-08 16:36:44 +00:00
|
|
|
]
|
|
|
|
}
|
2016-06-15 13:21:18 +00:00
|
|
|
debug.jniLibs.srcDirs = [
|
|
|
|
'libs/debug'
|
|
|
|
$$GRADLE_JNI_DIRS$$
|
|
|
|
]
|
|
|
|
release.jniLibs.srcDirs = [
|
|
|
|
'libs/release'
|
|
|
|
$$GRADLE_JNI_DIRS$$
|
|
|
|
]
|
|
|
|
}
|
2018-10-08 20:35:18 +00:00
|
|
|
|
2016-06-15 13:21:18 +00:00
|
|
|
applicationVariants.all { variant ->
|
2018-10-08 20:35:18 +00:00
|
|
|
variant.outputs.all { output ->
|
|
|
|
output.outputFileName = "../../../../../../../bin/android_${variant.name}.apk"
|
|
|
|
}
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
}
|
2017-03-06 10:04:21 +00:00
|
|
|
|
|
|
|
$$GRADLE_PLUGINS$$
|