2016-01-08 17:36:44 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2018-10-08 22:35:18 +02:00
|
|
|
google()
|
2016-01-08 17:36:44 +01:00
|
|
|
jcenter()
|
2017-10-06 11:08:57 +02:00
|
|
|
$$GRADLE_REPOSITORY_URLS$$
|
2016-01-08 17:36:44 +01:00
|
|
|
}
|
|
|
|
dependencies {
|
2018-10-08 22:35:18 +02:00
|
|
|
classpath 'com.android.tools.build:gradle:3.2.0'
|
2017-03-06 11:04:21 +01:00
|
|
|
$$GRADLE_CLASSPATH$$
|
2016-01-08 17:36:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
2017-03-25 13:11:20 +01:00
|
|
|
jcenter()
|
2016-01-08 17:36:44 +01:00
|
|
|
mavenCentral()
|
2018-01-11 20:24:11 +01:00
|
|
|
google()
|
2016-01-09 14:21:22 +01:00
|
|
|
$$GRADLE_REPOSITORY_URLS$$
|
2016-01-08 17:36:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2016-06-25 13:39:03 +02:00
|
|
|
$$GRADLE_DEPENDENCIES$$
|
2016-01-08 17:36:44 +01: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 15:57:49 +02:00
|
|
|
disable 'MissingTranslation'
|
2016-01-08 17:36:44 +01:00
|
|
|
}
|
|
|
|
|
2018-01-03 09:25:07 +01:00
|
|
|
compileSdkVersion 27
|
2018-10-08 22:35:18 +02: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 15:57:49 +02:00
|
|
|
useLibrary 'org.apache.http.legacy'
|
2016-01-08 17:36:44 +01:00
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/NOTICE'
|
|
|
|
}
|
|
|
|
defaultConfig {
|
2016-07-06 21:03:50 +02:00
|
|
|
$$GRADLE_DEFAULT_CONFIG$$
|
2016-01-08 17:36:44 +01:00
|
|
|
}
|
2016-06-15 15:21:18 +02:00
|
|
|
// Both signing and zip-aligning will be done at export time
|
|
|
|
buildTypes.all { buildType ->
|
|
|
|
buildType.zipAlignEnabled false
|
|
|
|
buildType.signingConfig null
|
|
|
|
}
|
2016-01-08 17:36:44 +01:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
2016-01-08 21:55:13 +01:00
|
|
|
java.srcDirs = ['src'
|
2016-06-25 13:39:03 +02:00
|
|
|
$$GRADLE_JAVA_DIRS$$
|
2016-01-08 17:36:44 +01:00
|
|
|
]
|
2017-01-24 16:29:09 +01:00
|
|
|
res.srcDirs = [
|
2016-01-08 17:36:44 +01:00
|
|
|
'res'
|
2017-10-06 11:08:57 +02:00
|
|
|
$$GRADLE_RES_DIRS$$
|
2016-01-08 17:36:44 +01:00
|
|
|
]
|
|
|
|
aidl.srcDirs = [
|
|
|
|
'aidl'
|
2017-10-06 11:08:57 +02:00
|
|
|
$$GRADLE_AIDL_DIRS$$
|
2016-01-08 17:36:44 +01:00
|
|
|
]
|
|
|
|
assets.srcDirs = [
|
|
|
|
'assets'
|
2016-06-25 13:39:03 +02:00
|
|
|
$$GRADLE_ASSET_DIRS$$
|
2016-01-08 17:36:44 +01:00
|
|
|
]
|
|
|
|
}
|
2016-06-15 15:21:18 +02:00
|
|
|
debug.jniLibs.srcDirs = [
|
|
|
|
'libs/debug'
|
|
|
|
$$GRADLE_JNI_DIRS$$
|
|
|
|
]
|
|
|
|
release.jniLibs.srcDirs = [
|
|
|
|
'libs/release'
|
|
|
|
$$GRADLE_JNI_DIRS$$
|
|
|
|
]
|
|
|
|
}
|
2018-10-08 22:35:18 +02:00
|
|
|
|
2016-06-15 15:21:18 +02:00
|
|
|
applicationVariants.all { variant ->
|
2018-10-08 22:35:18 +02:00
|
|
|
variant.outputs.all { output ->
|
|
|
|
output.outputFileName = "../../../../../../../bin/android_${variant.name}.apk"
|
|
|
|
}
|
2016-01-08 17:36:44 +01:00
|
|
|
}
|
|
|
|
}
|
2017-03-06 11:04:21 +01:00
|
|
|
|
|
|
|
$$GRADLE_PLUGINS$$
|