Skip to content

Commit 3dd3939

Browse files
authored
Merge pull request #662 from Iterable/chore/MOB-7314-update-gradle
2 parents 46b0038 + 8fc9c29 commit 3dd3939

File tree

15 files changed

+106
-113
lines changed

15 files changed

+106
-113
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Configure JDK
1919
uses: actions/setup-java@v1
2020
with:
21-
java-version: 1.8
21+
java-version: 11
2222

2323
- run: touch local.properties
2424

@@ -41,7 +41,7 @@ jobs:
4141
- name: Configure JDK
4242
uses: actions/setup-java@v1
4343
with:
44-
java-version: 1.8
44+
java-version: 11
4545

4646
- run: touch local.properties
4747

@@ -69,7 +69,7 @@ jobs:
6969
- name: Configure JDK
7070
uses: actions/setup-java@v1
7171
with:
72-
java-version: 1.8
72+
java-version: 11
7373

7474
- run: touch local.properties
7575

@@ -100,7 +100,7 @@ jobs:
100100
- name: Configure JDK
101101
uses: actions/setup-java@v1
102102
with:
103-
java-version: 1.8
103+
java-version: 11
104104

105105
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
106106
- run: chmod +x ./cc-test-reporter
@@ -118,7 +118,7 @@ jobs:
118118

119119
- run: bash <(curl -s https://codecov.io/bash)
120120
- run: ./cc-test-reporter format-coverage app/build/reports/jacoco/jacocoDebugTestReport/jacocoDebugTestReport.xml --input-type jacoco -d
121-
- run: ./cc-test-reporter format-coverage iterableapi/build/reports/coverage/debug/report.xml --input-type jacoco -d
121+
- run: ./cc-test-reporter format-coverage iterableapi/build/reports/coverage/androidTest/debug/connected/report.xml --input-type jacoco -d
122122
- run: ./cc-test-reporter format-coverage iterableapi/build/jacoco/jacoco.xml --input-type jacoco -d
123123
- run: ./cc-test-reporter format-coverage app/build/reports/jacoco/jacocoDebugAndroidTestReport/jacocoDebugAndroidTestReport.xml --input-type jacoco -d
124124
- run: ./cc-test-reporter upload-coverage

app/build.gradle

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ repositories {
88
}
99

1010
android {
11-
compileSdkVersion 29
12-
buildToolsVersion '29.0.3'
11+
compileSdkVersion 33
12+
buildToolsVersion '33.0.2'
13+
14+
namespace 'com.iterable.iterableapi.testapp'
15+
testNamespace 'iterable.com.iterableapi'
1316

1417
defaultConfig {
1518
applicationId "com.iterable.iterableapi.testapp"
@@ -28,7 +31,7 @@ android {
2831
}
2932

3033
debug {
31-
testCoverageEnabled true
34+
enableAndroidTestCoverage true
3235
}
3336
}
3437

@@ -55,14 +58,14 @@ dependencies {
5558
implementation project(':iterableapi')
5659
implementation project(':iterableapi-ui')
5760

58-
testImplementation 'junit:junit:4.12'
59-
testImplementation 'androidx.test:runner:1.2.0'
60-
testImplementation 'androidx.test.espresso:espresso-core:3.2.0'
61-
testImplementation 'androidx.test.ext:junit:1.1.1'
62-
testImplementation 'androidx.test:rules:1.2.0'
63-
testImplementation 'org.mockito:mockito-core:2.27.0'
64-
testImplementation 'org.robolectric:robolectric:4.3.1'
65-
testImplementation 'org.robolectric:shadows-playservices:4.3.1'
61+
testImplementation 'junit:junit:4.13.2'
62+
testImplementation 'androidx.test:runner:1.5.2'
63+
testImplementation 'androidx.test.espresso:espresso-core:3.5.1'
64+
testImplementation 'androidx.test.ext:junit:1.1.5'
65+
testImplementation 'androidx.test:rules:1.5.0'
66+
testImplementation 'org.mockito:mockito-core:3.3.3'
67+
testImplementation 'org.robolectric:robolectric:4.9.2'
68+
testImplementation 'org.robolectric:shadows-playservices:4.9.2'
6669
testImplementation 'com.squareup.okhttp3:mockwebserver:4.2.2'
6770
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
6871
androidTestImplementation 'androidx.test:runner:1.2.0'
@@ -80,6 +83,7 @@ dependencies {
8083

8184
tasks.withType(Test) {
8285
jacoco.includeNoLocationClasses = true
86+
jacoco.excludes = ['jdk.internal.*']
8387
}
8488

8589
task jacocoDebugTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) {
@@ -167,5 +171,5 @@ task jacocoDebugAndroidTestReport(type: JacocoReport, dependsOn: ['connectedChec
167171
classDirectories.from = files([debugTree])
168172
additionalSourceDirs.from = files([sdkSrc, sdkUiSrc])
169173
additionalClassDirs.from = files([sdkTree, sdkUiTree])
170-
executionData.from = fileTree(dir: "$buildDir", include: "outputs/code_coverage/debugAndroidTest/connected/*.ec")
174+
executionData.from = fileTree(dir: "$buildDir", include: "outputs/code_coverage/debugAndroidTest/connected/**/*.ec")
171175
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:tools="http://schemas.android.com/tools" package="iterable.com.iterableapi">
2+
<manifest xmlns:tools="http://schemas.android.com/tools">
33
<uses-sdk tools:overrideLibrary="br.com.concretesolutions.kappuccino,android_libs.ub_uiautomator,androidx.security"/>
44
</manifest>

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="com.iterable.iterableapi.testapp">
3+
xmlns:tools="http://schemas.android.com/tools">
54
<uses-sdk tools:overrideLibrary="androidx.security"/>
65
<application
76
android:allowBackup="true"

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = '1.4.32'
3+
ext.kotlin_version = '1.6.21'
44
ext.mavenPublishEnabled = true
55
repositories {
66
google()
@@ -10,8 +10,8 @@ buildscript {
1010
}
1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:4.0.2'
14-
classpath 'com.google.gms:google-services:4.3.4'
13+
classpath 'com.android.tools.build:gradle:7.4.2'
14+
classpath 'com.google.gms:google-services:4.3.10'
1515
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1616
classpath ('com.hiya:jacoco-android:0.2') {
1717
exclude group: 'org.codehaus.groovy', module: 'groovy-all'

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# org.gradle.parallel=true
1919
android.enableJetifier=true
2020
android.useAndroidX=true
21+
org.gradle.jvmargs=-Xmx2048m
2122

2223
GROUP=com.iterable
2324

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

iterableapi-ui/build.gradle

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,32 @@ apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
compileSdkVersion 29
5+
compileSdkVersion 33
6+
7+
namespace 'com.iterable.iterableapi.ui'
68

79
defaultConfig {
810
minSdkVersion 15
911
targetSdkVersion 28
10-
versionCode 1
11-
versionName "1.0"
1212
vectorDrawables.useSupportLibrary = true
1313
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1414
}
1515

16+
publishing {
17+
multipleVariants {
18+
allVariants()
19+
withJavadocJar()
20+
}
21+
}
22+
1623
buildTypes {
1724
release {
1825
minifyEnabled false
1926
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2027
}
2128

2229
debug {
23-
testCoverageEnabled true
30+
enableAndroidTestCoverage true
2431
}
2532
}
2633
}
@@ -31,36 +38,18 @@ dependencies {
3138
implementation 'androidx.appcompat:appcompat:1.0.0'
3239
implementation 'androidx.recyclerview:recyclerview:1.0.0'
3340

34-
testImplementation 'junit:junit:4.12'
41+
testImplementation 'junit:junit:4.13.2'
3542
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
3643
androidTestImplementation 'androidx.test:runner:1.2.0'
3744
androidTestImplementation 'androidx.test:rules:1.2.0'
3845

3946
}
4047

4148
ext {
42-
publishedGroupId = 'com.iterable'
4349
libraryName = 'iterableapi-ui'
44-
artifact = 'iterableapi-ui'
45-
46-
libraryDescription = 'Iterable Android SDK - UI'
47-
48-
siteUrl = 'https://github.com/Iterable/iterable-android-sdk'
49-
gitUrl = 'https://github.com/Iterable/iterable-android-sdk.git'
50-
5150
libraryVersion = '3.4.17'
52-
53-
developerId = 'davidtruong'
54-
developerName = 'David Truong'
55-
developerEmail = '[email protected]'
56-
57-
licenseName = 'The Apache Software License, Version 2.0'
58-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
59-
allLicenses = ["Apache-2.0"]
6051
}
6152

62-
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
63-
6453
if (hasProperty("mavenPublishEnabled")) {
6554
apply from: '../maven-push.gradle'
6655
}

iterableapi-ui/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
xmlns:tools="http://schemas.android.com/tools"
3-
package="com.iterable.iterableapi.ui">
2+
xmlns:tools="http://schemas.android.com/tools">
43
<uses-sdk tools:overrideLibrary="androidx.security"/>
54
<application>
65
<activity

iterableapi/build.gradle

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ apply plugin: 'com.hiya.jacoco-android'
44
apply plugin: 'checkstyle'
55

66
android {
7-
compileSdkVersion 29
8-
buildToolsVersion '29.0.3'
7+
compileSdkVersion 33
8+
buildToolsVersion '33.0.2'
9+
10+
namespace 'com.iterable.iterableapi'
11+
testNamespace 'iterable.com.iterableapi'
912

1013
compileOptions {
1114
sourceCompatibility 1.8
@@ -21,13 +24,20 @@ android {
2124
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2225
}
2326

27+
publishing {
28+
multipleVariants {
29+
allVariants()
30+
withJavadocJar()
31+
}
32+
}
33+
2434
buildTypes {
2535
release {
2636
minifyEnabled false
2737
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2838
}
2939
debug {
30-
testCoverageEnabled true
40+
enableAndroidTestCoverage true
3141
multiDexEnabled true
3242
}
3343
}
@@ -49,14 +59,14 @@ dependencies {
4959
api 'com.google.firebase:firebase-messaging:20.3.0'
5060
implementation "androidx.security:security-crypto:1.1.0-alpha06"
5161

52-
testImplementation 'junit:junit:4.12'
53-
testImplementation 'androidx.test:runner:1.3.0'
54-
testImplementation 'androidx.test.espresso:espresso-core:3.3.0'
55-
testImplementation 'androidx.test.ext:junit:1.1.2'
56-
testImplementation 'androidx.test:rules:1.3.0'
62+
testImplementation 'junit:junit:4.13.2'
63+
testImplementation 'androidx.test:runner:1.5.2'
64+
testImplementation 'androidx.test.espresso:espresso-core:3.5.1'
65+
testImplementation 'androidx.test.ext:junit:1.1.5'
66+
testImplementation 'androidx.test:rules:1.5.0'
5767
testImplementation 'org.mockito:mockito-core:3.3.3'
58-
testImplementation 'org.robolectric:robolectric:4.4'
59-
testImplementation 'org.robolectric:shadows-playservices:4.4'
68+
testImplementation 'org.robolectric:robolectric:4.9.2'
69+
testImplementation 'org.robolectric:shadows-playservices:4.9.2'
6070
testImplementation 'org.khronos:opengl-api:gl1.1-android-2.1_r1'
6171
testImplementation 'com.squareup.okhttp3:mockwebserver:4.2.2'
6272
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
@@ -72,28 +82,10 @@ dependencies {
7282
}
7383

7484
ext {
75-
publishedGroupId = 'com.iterable'
7685
libraryName = 'iterableapi'
77-
artifact = 'iterableapi'
78-
79-
libraryDescription = 'Iterable Android SDK'
80-
81-
siteUrl = 'https://github.com/Iterable/iterable-android-sdk'
82-
gitUrl = 'https://github.com/Iterable/iterable-android-sdk.git'
83-
8486
libraryVersion = '3.4.17'
85-
86-
developerId = 'davidtruong'
87-
developerName = 'David Truong'
88-
developerEmail = '[email protected]'
89-
90-
licenseName = 'The Apache Software License, Version 2.0'
91-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
92-
allLicenses = ["Apache-2.0"]
9387
}
9488

95-
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
96-
9789
if (hasProperty("mavenPublishEnabled")) {
9890
apply from: '../maven-push.gradle'
9991
}
@@ -108,6 +100,7 @@ task javadoc(type: Javadoc) {
108100

109101
tasks.withType(Test) {
110102
jacoco.includeNoLocationClasses = true
103+
jacoco.excludes = ['jdk.internal.*']
111104
}
112105

113106
task checkstyle(type: Checkstyle) {

0 commit comments

Comments
 (0)