Skip to content

Commit

Permalink
feat(android): update support libraries (#13473)
Browse files Browse the repository at this point in the history
* gradle update

* downgrade agp

* keep target/compile sdk

* put version name/code back in
  • Loading branch information
m1ga committed Jun 20, 2022
1 parent 58852ca commit 2958575
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.codehaus.groovy:groovy-json:3.0.11'
}
}

Expand All @@ -29,7 +30,7 @@ allprojects {
project.apply plugin: 'checkstyle'
checkstyle {
toolVersion = '8.38'
configFile file("${rootDir}/checkstyle.xml");
configFile file("${rootDir}/checkstyle.xml")
ignoreFailures false
showViolations true
}
Expand Down
2 changes: 1 addition & 1 deletion android/templates/build/root.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand Down
6 changes: 3 additions & 3 deletions android/templates/build/ti.constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
*/

project.ext {
tiAndroidXAppCompatLibVersion = '1.4.1'
tiAndroidXCoreLibVersion = '1.7.0'
tiAndroidXAppCompatLibVersion = '1.4.2'
tiAndroidXCoreLibVersion = '1.8.0'
tiAndroidXFragmentLibVersion = '1.4.1'
tiMaterialLibVersion = '1.5.0'
tiMaterialLibVersion = '1.6.1'
tiPlayServicesBaseLibVersion = '18.0.1'
tiManifestPlaceholders = [
tiActivityConfigChanges: 'density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode'
Expand Down
4 changes: 0 additions & 4 deletions android/titanium/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,5 @@
android:exported="false"
android:grantUriPermissions="true"/>

<service
android:name="com.appcelerator.aps.APSAnalyticsService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false"/>
</application>
</manifest>
15 changes: 9 additions & 6 deletions android/titanium/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.android.build.gradle.tasks.ExternalNativeCleanTask
import groovy.json.JsonSlurper

/**
* TiDev Titanium Mobile
* Copyright TiDev, Inc. 04/07/2022-Present
Expand All @@ -12,7 +15,7 @@ apply plugin: 'maven-publish'
// Prefer environment variables assigned via build/package scripts under "titanium_mobile/build" folder.
def tiBuildVersionString = System.env.TI_SDK_BUILD_VERSION
if (tiBuildVersionString == null) {
def packageJson = new groovy.json.JsonSlurper().parse(file("${projectDir}/../../package.json"))
def packageJson = new JsonSlurper().parse(file("${projectDir}/../../package.json"))
tiBuildVersionString = packageJson.version
if (tiBuildVersionString == null) {
tiBuildVersionString = '1.0.0'
Expand Down Expand Up @@ -123,7 +126,7 @@ android {

// Downloads/extracts V8 library and creates a cmake file for it. To be executed before C/C++ "build" or "clean".
task updateV8Library() {
def packageJson = new groovy.json.JsonSlurper().parse(file("${projectDir}/../package.json"))
def packageJson = new JsonSlurper().parse(file("${projectDir}/../package.json"))
def v8MakeFilePath = "${projectDir}/../runtime/v8/src/ndk-modules/libv8/V8Settings.cmake"
inputs.property 'v8.version', packageJson.v8.version
inputs.property 'v8.mode', packageJson.v8.mode
Expand All @@ -149,7 +152,7 @@ task updateV8Library() {
}
}
preBuild.dependsOn updateV8Library
tasks.withType(com.android.build.gradle.tasks.ExternalNativeCleanTask) {
tasks.withType(ExternalNativeCleanTask) {
dependsOn updateV8Library
}

Expand Down Expand Up @@ -250,23 +253,23 @@ dependencies {
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
implementation 'androidx.exifinterface:exifinterface:1.3.3'
implementation "androidx.fragment:fragment:${project.ext.tiAndroidXFragmentLibVersion}"
implementation 'androidx.media:media:1.5.0'
implementation 'androidx.media:media:1.6.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.transition:transition:1.4.1'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.viewpager:viewpager:1.0.0'
compileOnly 'androidx.annotation:annotation:1.2.0'
compileOnly 'androidx.annotation:annotation:1.3.0'

// Google's "Material Components" themed UI library.
implementation "com.google.android.material:material:${project.ext.tiMaterialLibVersion}"

// The Google Play Services libraries are only used by Titanium's geolocation feature.
// We link to them dynamically at runtime. So, they can be safely excluded when in the app project.
implementation "com.google.android.gms:play-services-base:${project.ext.tiPlayServicesBaseLibVersion}"
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.android.gms:play-services-location:19.0.1'

// XML library providing XPath support to our Ti.XML APIs.
implementation 'jaxen:jaxen:1.2.0'
Expand Down

0 comments on commit 2958575

Please sign in to comment.