Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27778] Android: Update gradle build tools to 3.6.x

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2020-04-02T14:27:44.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.1
ComponentsAndroid
Labelsandroid, build, gradle, tools
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-02-25T00:00:28.000+0000
Updated2020-04-02T14:27:44.000+0000

Description

*Summary:* As of Titanium 9.0.0, we're using Android gradle build tool 3.4.2 to build the SDK, apps, and modules.
'com.android.tools.build:gradle:3.4.2'
We should update the tools to version 3.6.x. https://developer.android.com/studio/releases/gradle-plugin#3-6-0 The newest build tools are supposed to improve APK build times. https://developer.android.com/studio/releases/gradle-plugin#zipflinger *Note:* We should also update our gradle template to 6.0.x which has full support for JDK 13. https://developer.android.com/studio/releases/gradle-plugin#updating-gradle https://docs.gradle.org/6.0/release-notes.html *To-Do:* We must update the version in the following files... https://github.com/appcelerator/titanium_mobile/blob/master/android/build.gradle https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/build/root.build.gradle Upgrading will cause the SDK and module builds to fail. The reason is because Google's build tool will now compile C/C++ before Java, which is an issue since our kroll-apt Java annotation processor generates C++ source files. We can solve this by adding the below to the library project's "build.gradle" file.
project.afterEvaluate {
	externalNativeBuildDebug.dependsOn compileDebugJavaWithJavac
	externalNativeBuildRelease.dependsOn compileReleaseJavaWithJavac
}
https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/build.gradle https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/module/generated/build.gradle We will also need to update our gradlew and gradle library folder to the newest version. https://github.com/appcelerator/titanium_mobile/tree/master/android

Comments

  1. Joshua Quick 2020-02-29

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11507 PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11510
  2. Sohail Saddique 2020-03-20

  3. Samir Mohammed 2020-04-02

    *Closing ticket.* Fix verified in SDK version 9.1.0.v20200401121418. and 9.0.1.v20200331084758 Test and other information can be found at: PR (master): https://github.com/appcelerator/titanium_mobile/pull/11507 PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11510

JSON Source