Skip to content

Commit c244915

Browse files
authored
Merge pull request #1499 from OneSignal/upgrade-dev-env-2021-12
SDK Development Environment - Upgrade SDK to Gradle 7 and AGP 7
2 parents 47c8494 + 23473ea commit c244915

File tree

12 files changed

+294
-218
lines changed

12 files changed

+294
-218
lines changed

.travis.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
language: android
22
sudo: false
3-
jdk: oraclejdk8
3+
jdk: oraclejdk11
44
dist: trusty
55

6+
env:
7+
global:
8+
- JAVA_TOOL_OPTIONS=-Dhttps.protocols=TLSv1.2
9+
- ANDROID_HOME=/usr/local/android-sdk
10+
- ANDROID_TOOLS=${ANDROID_HOME}/cmdline-tools/latest
11+
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_TOOLS}:${ANDROID_TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
12+
613
android:
714
components:
815
- tools
916
- tools # Include again to work around travis not using the latest.
1017
# https://github.com/travis-ci/travis-ci/issues/6193
1118
# Required to get the newest platform-tools.
1219
- platform-tools
13-
- build-tools-29.0.3
14-
- android-29
20+
- build-tools-31.0.0
21+
- android-31
1522
licenses:
1623
- '.+'
1724
- 'android-sdk-license-.+'
1825
before_install:
19-
- yes | sdkmanager "platforms;android-29"
20-
- yes | sdkmanager "build-tools;29.0.3"
26+
# Download newer Android tools that are compatible with Java 11
27+
- wget -q "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip" -O android-commandline-tools-linux.zip
28+
- mkdir -p ${ANDROID_HOME}/cmdline-tools
29+
- unzip -q android-commandline-tools-linux.zip -d ${ANDROID_HOME}/cmdline-tools
30+
- mv ${ANDROID_HOME}/cmdline-tools/cmdline-tools ${ANDROID_HOME}/cmdline-tools/latest
31+
- yes | ${ANDROID_TOOLS}/bin/sdkmanager "platforms;android-31"
32+
- yes | ${ANDROID_TOOLS}/bin/sdkmanager "build-tools;31.0.0"
2133
- pwd
2234
- ls -la
2335
- cd OneSignalSDK

Examples/OneSignalDemo/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ dependencies {
7777
exclude group: 'com.google.firebase', module: 'firebase-messaging'
7878
}
7979
// Add HMS Push library
80-
huaweiImplementation 'com.huawei.hms:push:5.3.0.304'
80+
huaweiImplementation 'com.huawei.hms:push:6.1.0.300'
8181
// Optionally add HMS location
8282
huaweiImplementation 'com.huawei.hms:location:4.0.0.300'
8383
/** END - Huawei Builds **/

Examples/OneSignalDemo/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
classpath 'com.android.tools.build:gradle:7.0.4'
1313
classpath 'com.google.gms:google-services:4.3.10'
1414
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.14.0, 0.99.99]'
15-
classpath 'com.huawei.agconnect:agcp:1.2.1.301'
15+
classpath 'com.huawei.agconnect:agcp:1.6.2.300'
1616

1717
// TODO: Do not place your application dependencies here; they belong
1818
// in the individual module build.gradle files

OneSignalSDK/build.gradle

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ buildscript {
77
compileSdkVersion: 31,
88
targetSdkVersion: 31
99
]
10-
androidGradlePluginVersion = '3.6.2'
11-
googleServicesGradlePluginVersion = '4.3.2'
12-
huaweiAgconnectVersion = '1.2.1.301'
13-
huaweiHMSPushVersion = '5.3.0.304'
10+
androidGradlePluginVersion = '7.0.4'
11+
googleServicesGradlePluginVersion = '4.3.10'
12+
huaweiAgconnectVersion = '1.6.2.300'
13+
huaweiHMSPushVersion = '6.1.0.300'
1414
huaweiHMSLocationVersion = '4.0.0.300'
1515
kotlinVersion = '1.4.32'
16-
onesignalGradlePluginVersion = '[0.12.6, 0.99.99]'
16+
onesignalGradlePluginVersion = '[0.14.0, 0.99.99]'
1717
}
1818

1919
repositories {
2020
google()
21-
jcenter()
22-
maven { url 'https://maven.google.com' }
21+
mavenCentral()
2322

2423
// OneSignal-Gradle-Plugin - Local testing
2524
// maven { url uri('../../repo') }
2625

2726
// OneSignal-Gradle-Plugin - Public version
28-
maven { url 'https://plugins.gradle.org/m2/' }
27+
gradlePluginPortal()
28+
2929
// Huawei maven
30-
maven { url 'http://developer.huawei.com/repo/' }
30+
maven { url 'https://developer.huawei.com/repo/' }
3131
}
3232
dependencies {
3333
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
@@ -46,12 +46,11 @@ buildscript {
4646
allprojects {
4747
repositories {
4848
google()
49-
jcenter()
49+
mavenCentral()
5050
flatDir {
5151
dirs 'libs'
5252
}
53-
maven { url 'https://maven.google.com' }
5453
// Huawei maven
55-
maven { url 'http://developer.huawei.com/repo/' }
54+
maven { url 'https://developer.huawei.com/repo/' }
5655
}
57-
}
56+
}
4.69 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Wed Apr 15 11:26:10 PDT 2020
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

0 commit comments

Comments
 (0)