Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27778

Android: Update gradle build tools to 3.6.x

    Details

    • Story Points:
      3
    • Sprint:
      2020 Sprint 5

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jquick Joshua Quick
                Reviewer:
                Gary Mathews
                Tester:
                Sohail Saddique
              • Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration