2016-01-08 16:36:44 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
2019-03-18 23:23:30 +00:00
|
|
|
mavenCentral()
|
|
|
|
google()
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
dependencies {
|
2019-03-18 23:23:30 +00:00
|
|
|
classpath 'com.android.tools.build:gradle:3.3.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 {
|
2019-03-18 23:23:30 +00:00
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
|
|
|
google()
|
|
|
|
$$GRADLE_REPOSITORY_URLS$$
|
|
|
|
}
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
dependencies {
|
2016-06-25 11:39:03 +00:00
|
|
|
$$GRADLE_DEPENDENCIES$$
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
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
|
|
|
disable 'MissingTranslation'
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
|
2018-01-03 08:05:27 +00:00
|
|
|
compileSdkVersion 27
|
2019-03-18 23:23:30 +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'
|
2016-06-25 11:39:03 +00:00
|
|
|
$$GRADLE_RES_DIRS$$
|
2016-01-08 16:36:44 +00:00
|
|
|
]
|
|
|
|
aidl.srcDirs = [
|
|
|
|
'aidl'
|
2016-06-25 11:39:03 +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$$
|
|
|
|
]
|
|
|
|
}
|
2019-03-18 23:23:30 +00:00
|
|
|
// Undocumented; may break in a future Gradle version
|
2016-06-15 13:21:18 +00:00
|
|
|
applicationVariants.all { variant ->
|
2019-03-18 23:23:30 +00:00
|
|
|
variant.outputs.all {
|
|
|
|
outputFileName = "../../../../../../../bin/android_${variant.name}.apk"
|
|
|
|
}
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
}
|
2017-03-06 10:04:21 +00:00
|
|
|
|
|
|
|
$$GRADLE_PLUGINS$$
|