2016-01-08 16:36:44 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
2017-10-06 09:08:57 +00:00
|
|
|
$$GRADLE_REPOSITORY_URLS$$
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
dependencies {
|
2017-07-30 04:30:20 +00:00
|
|
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
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 {
|
2017-03-25 12:11:20 +00:00
|
|
|
jcenter()
|
2016-01-08 16:36:44 +00:00
|
|
|
mavenCentral()
|
2018-01-11 19:24:11 +00:00
|
|
|
google()
|
2016-01-09 13:21:22 +00:00
|
|
|
$$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:25:07 +00:00
|
|
|
compileSdkVersion 27
|
|
|
|
buildToolsVersion "27.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$$
|
|
|
|
]
|
|
|
|
}
|
|
|
|
applicationVariants.all { variant ->
|
|
|
|
// ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin
|
|
|
|
variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk"))
|
2016-01-08 16:36:44 +00:00
|
|
|
}
|
|
|
|
}
|
2017-03-06 10:04:21 +00:00
|
|
|
|
|
|
|
$$GRADLE_PLUGINS$$
|