Skip to content

Commit 368a01b

Browse files
committed
release: SDK 1.18.0
1 parent 3012196 commit 368a01b

File tree

113 files changed

+12305
-1344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+12305
-1344
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ javadoc
1212
public-sdk/Batch.aar
1313
public-sdk/Batch.aar.asc
1414
public-sdk/Batch.mapping.txt
15+
node_modules/
1516

1617
# Recommended ignore from Gradle
1718
**/.idea/dataSources.*

Sources/.idea/codeStyles/Project.xml

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/.idea/runConfigurations.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

Sources/.idea/runConfigurations/sdk_tests_junit_gradle.xml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.3.50'
4+
ext.kotlin_version = '1.5.21'
55
ext.kotlin_couroutines_version = '1.3.2'
66

77
repositories {
88
mavenCentral()
99
google()
10-
jcenter()
1110
}
1211
dependencies {
13-
classpath 'com.android.tools.build:gradle:4.2.0'
12+
classpath 'com.android.tools.build:gradle:7.0.3'
1413
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.1"
1514
// NOTE: Do not place your application dependencies here; they belong
1615
// in the individual module build.gradle files
@@ -23,6 +22,5 @@ allprojects {
2322
repositories {
2423
mavenCentral()
2524
google()
26-
jcenter()
2725
}
2826
}

Sources/gradle.properties

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1414
# org.gradle.parallel=true
1515

16-
org.gradle.jvmargs=-Xmx4096m
16+
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
1717
org.gradle.caching=true
18-
android.enableBuildCache=true
19-
android.enableD8.desugaring=true
2018
org.gradle.configureondemand=false
2119
android.useAndroidX=true
2220
android.enableJetifier=true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Sources/sdk-lint/build.gradle

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'java-library'
22

33
dependencies {
4-
compileOnly 'com.android.tools.lint:lint-api:26.6.3'
5-
compileOnly 'com.android.tools.lint:lint-checks:26.6.3'
4+
compileOnly 'com.android.tools.lint:lint-api:30.0.3'
5+
compileOnly 'com.android.tools.lint:lint-checks:30.0.3'
66

77
testImplementation "junit:junit:4.12"
8-
testImplementation "com.android.tools.lint:lint:26.6.3"
9-
testImplementation "com.android.tools.lint:lint-tests:26.6.3"
10-
testImplementation "com.android.tools:testutils:26.6.3"
8+
testImplementation "com.android.tools.lint:lint:30.0.3"
9+
testImplementation "com.android.tools.lint:lint-tests:30.0.3"
10+
testImplementation "com.android.tools:testutils:30.0.3"
1111
}
1212

1313

@@ -16,3 +16,8 @@ jar {
1616
attributes("Lint-Registry-v2": "com.batch.android.lint.BatchIssueRegistry")
1717
}
1818
}
19+
20+
java {
21+
sourceCompatibility = JavaVersion.VERSION_1_8
22+
targetCompatibility = JavaVersion.VERSION_1_8
23+
}

Sources/sdk-lint/src/main/java/com/batch/android/lint/BatchIssueRegistry.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package com.batch.android.lint;
22

33
import com.android.tools.lint.client.api.IssueRegistry;
4+
import com.android.tools.lint.client.api.Vendor;
45
import com.android.tools.lint.detector.api.ApiKt;
56
import com.android.tools.lint.detector.api.Issue;
67

78
import org.jetbrains.annotations.NotNull;
9+
import org.jetbrains.annotations.Nullable;
810

911
import java.util.Collections;
1012
import java.util.List;
@@ -19,6 +21,19 @@ public int getApi()
1921
return ApiKt.CURRENT_API;
2022
}
2123

24+
@Override
25+
public int getMinApi()
26+
{
27+
return 6;
28+
}
29+
30+
@Nullable
31+
@Override
32+
public Vendor getVendor()
33+
{
34+
return new Vendor("Batch.com", "com.batch.android", "https://batch.com", "Batch SDK Team via email/slack");
35+
}
36+
2237
@NotNull
2338
@Override
2439
public List<Issue> getIssues()

Sources/sdk-stubs/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 30
4+
compileSdkVersion 31
55

66
defaultConfig {
77
minSdkVersion 15
8-
targetSdkVersion 30
8+
targetSdkVersion 31
99
versionCode 1
1010
versionName "1.0"
1111
}

Sources/sdk/build.gradle

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ ext {
1717
}
1818

1919
android {
20-
compileSdkVersion 30
20+
compileSdkVersion 31
2121
defaultPublishConfig "release"
2222

2323
resourcePrefix "com_batchsdk_"
2424

2525
defaultConfig {
2626
minSdkVersion 15
27-
targetSdkVersion 30
27+
targetSdkVersion 31
2828
versionCode 1
29-
versionName "1.17.3"
29+
versionName "1.18.0"
3030
buildConfigField "String", SDK_VERSION, "\"$versionName\""
31-
buildConfigField "Integer", API_LEVEL, '36'
32-
buildConfigField "Integer", MESSAGING_API_LEVEL, '10'
31+
buildConfigField "Integer", API_LEVEL, '40'
32+
buildConfigField "Integer", MESSAGING_API_LEVEL, '11'
3333
buildConfigField "String", WS_DOMAIN, '"ws.batch.com"'
3434

3535
consumerProguardFiles 'proguard-consumer-rules.txt'
@@ -98,7 +98,7 @@ dependencies {
9898
compileOnly "com.google.android.gms:play-services-nearby:$playServicesVersion"
9999
compileOnly 'com.google.android.play:core:1.9.0'
100100
compileOnly "com.google.firebase:firebase-core:17.4.3"
101-
compileOnly "com.google.firebase:firebase-messaging:20.2.1"
101+
compileOnly "com.google.firebase:firebase-messaging:22.0.0"
102102
compileOnly project(':sdk-stubs')
103103
compileOnly project(':sdk-processor')
104104
annotationProcessor project(':sdk-processor')
@@ -111,12 +111,12 @@ dependencies {
111111

112112
androidTestImplementation 'junit:junit:4.12'
113113
androidTestImplementation "androidx.annotation:annotation:$androidXLibraryVersion"
114-
androidTestImplementation 'androidx.test:rules:1.2.0'
115-
androidTestImplementation 'androidx.test:runner:1.2.0'
116-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
117-
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
118-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
119-
androidTestImplementation 'androidx.test.ext:truth:1.2.0'
114+
androidTestImplementation 'androidx.test:rules:1.4.0'
115+
androidTestImplementation 'androidx.test:runner:1.4.0'
116+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
117+
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
118+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
119+
androidTestImplementation 'androidx.test.ext:truth:1.4.0'
120120
androidTestImplementation 'org.mockito:mockito-android:3.2.0'
121121

122122
androidTestImplementation "com.google.android.gms:play-services-ads:$playServicesVersion"
@@ -128,13 +128,13 @@ dependencies {
128128

129129
testImplementation 'junit:junit:4.12'
130130
testImplementation 'org.mockito:mockito-core:3.2.0'
131-
testImplementation 'androidx.test:core:1.2.0'
132-
testImplementation 'androidx.test:rules:1.2.0'
133-
testImplementation 'androidx.test.ext:junit:1.1.1'
134-
testImplementation 'androidx.test.ext:junit-ktx:1.1.1'
135-
testImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
136-
testImplementation 'androidx.test.espresso:espresso-core:3.2.0'
137-
testImplementation 'androidx.test.ext:truth:1.2.0'
131+
testImplementation 'androidx.test:core:1.4.0'
132+
testImplementation 'androidx.test:rules:1.4.0'
133+
testImplementation 'androidx.test.ext:junit:1.1.3'
134+
testImplementation 'androidx.test.ext:junit-ktx:1.1.3'
135+
testImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
136+
testImplementation 'androidx.test.espresso:espresso-core:3.4.0'
137+
testImplementation 'androidx.test.ext:truth:1.4.0'
138138
testImplementation "com.google.android.gms:play-services-ads:$playServicesVersion"
139139
testImplementation "com.google.android.gms:play-services-gcm:$playServicesVersion"
140140
testImplementation "com.google.android.gms:play-services-location:$playServicesVersion"

Sources/sdk/lint-baseline.xml

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-
<issues format="5" by="lint 4.2.0" client="gradle" variant="debug" version="4.2.0">
2+
<issues format="6" by="lint 7.0.3" type="baseline" client="gradle" name="AGP (7.0.3)" variant="all" version="7.0.3">
33

44
</issues>

Sources/sdk/lint.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<lint>
3+
<issue id="AnnotateVersionCheck" severity="error" />
4+
<issue id="UnspecifiedImmutableFlag" severity="error" />
35
<issue id="OldTargetApi" severity="warning" />
46

57
<!-- android.lintOptions.warningsAsErrors should do this but ... IDK -->

Sources/sdk/maven-publish.gradle

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,35 @@ if (signingFile.exists()) {
1919
}
2020
}
2121

22+
sourceSets {
23+
main {
24+
java.srcDirs += 'build/generated'
25+
}
26+
}
27+
28+
task androidJavadocs(type: Javadoc) {
29+
source = sourceSets.main.java.srcDirs
30+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
31+
options.addStringOption('Xdoclint:none', '-quiet')
32+
android.libraryVariants.all { variant ->
33+
if (variant.name == 'release') {
34+
owner.classpath += variant.getCompileClasspath()
35+
}
36+
}
37+
exclude '**/gif/README'
38+
exclude '**/R.html', '**/R.*.html', '**/index.html'
39+
}
40+
41+
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
42+
archiveClassifier.set("javadoc")
43+
from androidJavadocs.destinationDir
44+
}
45+
46+
task androidSourcesJar(type: Jar) {
47+
archiveClassifier.set("sources")
48+
from sourceSets.main.java.srcDirs
49+
}
50+
2251
nexusStaging {
2352
packageGroup = mavenGroupId
2453
}
@@ -32,6 +61,8 @@ publishing {
3261
version android.defaultConfig.versionName
3362

3463
artifact(project.rootProject.file("../public-sdk/Batch.aar"))
64+
artifact androidJavadocsJar
65+
artifact androidSourcesJar
3566

3667
pom {
3768
name = "Batch.com Android SDK"

0 commit comments

Comments
 (0)