Skip to content

Commit a7e2a22

Browse files
committed
chore: update gradle wrapper
1 parent 161fc45 commit a7e2a22

27 files changed

+370
-592
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ charset = utf-8
99
indent_style = space
1010
indent_size = 2
1111

12-
[*.{java,groovy,gradle}]
12+
[*.{java,groovy,gradle,kts}]
1313
indent_size = 4
1414

1515
[*.md]

.github/workflows/check.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- run: ./gradlew checkstyleMain checkstyleTest checkWithCodenarc runUnitTests
15+
- name: Set up the JDK
16+
uses: actions/setup-java@v3
17+
with:
18+
java-version: '17'
19+
distribution: 'temurin'
20+
- run: ./gradlew checkWithCodenarc checkstyleMain checkstyleTest runUnitTests

.github/workflows/emulate.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818
- name: checkout
1919
uses: actions/checkout@v4
2020

21+
- name: Set up the JDK
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: '17'
25+
distribution: 'temurin'
26+
2127
- name: Enable KVM
2228
run: |
2329
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules

.github/workflows/integration-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ jobs:
1515
with:
1616
submodules: 'recursive'
1717

18+
- name: Set up the JDK
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '17'
22+
distribution: 'temurin'
23+
1824
- run: ./gradlew :java:testRestSuite
1925

2026
- uses: actions/upload-artifact@v3
@@ -30,6 +36,12 @@ jobs:
3036
with:
3137
submodules: 'recursive'
3238

39+
- name: Set up the JDK
40+
uses: actions/setup-java@v3
41+
with:
42+
java-version: '17'
43+
distribution: 'temurin'
44+
3345
- run: ./gradlew :java:testRealtimeSuite
3446

3547
- uses: actions/upload-artifact@v3

.github/workflows/javadoc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
- name: Set up the JDK
2626
uses: actions/setup-java@v3
2727
with:
28-
java-version: '11'
29-
distribution: 'adopt'
28+
java-version: '17'
29+
distribution: 'temurin'
3030

3131
- name: Build docs
3232
run: ./gradlew javadoc

CONTRIBUTING.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ implementation files('libs/ably-android-1.2.42.aar')
201201
This library uses [semantic versioning](http://semver.org/). For each release, the following needs to be done:
202202

203203
1. Create a branch for the release, named like `release/1.2.4` (where `1.2.4` is what you're releasing, being the new version)
204-
2. Replace all references of the current version number with the new version number (check the [README.md](./README.md) and [common.gradle](./common.gradle)) and commit the changes
205-
a. Increment the `versionCode` in the Android project's `build.gradle` by 1
204+
2. Replace all references of the current version number with the new version number (check the [README.md](./README.md) and [gradle.properties](./gradle.properties)) and commit the changes
206205
3. Run [`github_changelog_generator`](https://github.com/github-changelog-generator/github-changelog-generator) to automate the update of the [CHANGELOG](./CHANGELOG.md). This may require some manual intervention, both in terms of how the command is run and how the change log file is modified. Your mileage may vary:
207206
- The command you will need to run will look something like this: `github_changelog_generator -u ably -p ably-java --since-tag v1.2.3 --output delta.md --token $GITHUB_TOKEN_WITH_REPO_ACCESS`. Generate token [here](https://github.com/settings/tokens/new?description=GitHub%20Changelog%20Generator%20token).
208207
- Using the command above, `--output delta.md` writes changes made after `--since-tag` to a new file.
@@ -212,12 +211,10 @@ This library uses [semantic versioning](http://semver.org/). For each release, t
212211
5. Make a PR against `main`
213212
6. Once the PR is approved, merge it into `main`
214213
7. From the updated `main` branch on your local workstation, assemble and upload:
215-
1. Run `./gradlew java:assembleRelease -PpublishTarget=MavenCentral` to build and upload `ably-java` to Nexus staging repository
216-
2. Run `./gradlew android:assembleRelease -PpublishTarget=MavenCentral` build and upload `ably-android` to Nexus staging repository
217-
3. Find the new staging repository using the [Nexus Repository Manager](https://oss.sonatype.org/#stagingRepositories)
218-
4. Check that it contains `ably-android` and `ably-java` releases
219-
5. "Close" it - this will take a few minutes during which time it will say (after a refresh of your browser) that "Activity: Operation in Progress"
220-
6. Once it has closed you will have "Release" available. You can allow it to "automatically drop" after successful release. A refresh or two later of the browser and the staging repository will have disappeared from the list (i.e. it's been dropped which implies it was released successfully)
214+
1. Run `./gradlew publishToMavenCentral` to build and upload `ably-java` and `ably-android` to Nexus staging repository
215+
2. Find the new staging repository using the [Nexus Repository Manager](https://oss.sonatype.org/#stagingRepositories)
216+
3. Check that it contains `ably-android` and `ably-java` releases
217+
4. "Release" it - this will take a few minutes during which time it will say (after a refresh of your browser) that "Activity: Operation in Progress". You can allow it to "automatically drop" after successful release. A refresh or two later of the browser and the staging repository will have disappeared from the list (i.e. it's been dropped which implies it was released successfully)
221218
7. A [search for Ably packages](https://oss.sonatype.org/#nexus-search;quick~io.ably) should now list the new version for both `ably-android` and `ably-java`
222219
8. Add a tag and push to origin - e.g.: `git tag v1.2.4 && git push origin v1.2.4`
223220
9. Create the release on Github including populating the release notes

android/build.gradle

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

android/build.gradle.kts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
plugins {
2+
alias(libs.plugins.android.library)
3+
alias(libs.plugins.maven.publish)
4+
}
5+
6+
android {
7+
namespace = "io.ably.lib"
8+
defaultConfig {
9+
minSdk = 19
10+
compileSdk = 30
11+
buildConfigField("String", "LIBRARY_NAME", "\"android\"")
12+
buildConfigField("String", "VERSION", "\"${property("VERSION_NAME")}\"")
13+
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
14+
testInstrumentationRunnerArguments["class"] = "io.ably.lib.test.android.AndroidPushTest"
15+
testInstrumentationRunnerArguments["timeout_msec"] = "300000"
16+
consumerProguardFiles("proguard.txt")
17+
}
18+
19+
compileOptions {
20+
sourceCompatibility = JavaVersion.VERSION_1_8
21+
targetCompatibility = JavaVersion.VERSION_1_8
22+
}
23+
24+
buildTypes {
25+
getByName("release") {
26+
isMinifyEnabled = false
27+
}
28+
}
29+
30+
buildFeatures {
31+
buildConfig = true
32+
}
33+
34+
lint {
35+
abortOnError = false
36+
}
37+
38+
testOptions.targetSdk = 30
39+
40+
sourceSets {
41+
getByName("main") {
42+
java.srcDirs("src/main/java", "../lib/src/main/java")
43+
}
44+
getByName("androidTest") {
45+
java.srcDirs("src/androidTest/java", "../lib/src/test/java")
46+
assets.srcDirs("../lib/src/test/resources")
47+
}
48+
}
49+
}
50+
51+
dependencies {
52+
api(libs.gson)
53+
implementation(libs.bundles.common)
54+
testImplementation(libs.bundles.tests)
55+
implementation(libs.firebase.messaging)
56+
androidTestImplementation(libs.bundles.instrumental.android)
57+
}
58+
59+
configurations {
60+
all {
61+
exclude(group = "org.hamcrest", module = "hamcrest-core")
62+
}
63+
getByName("androidTestImplementation") {
64+
extendsFrom(configurations.getByName("testImplementation"))
65+
}
66+
}

android/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_ARTIFACT_ID=ably-android
2+
POM_NAME=Ably Android client library SDK
3+
POM_DESCRIPTION=An Android Realtime and REST client library SDK for the Ably platform.
4+
POM_PACKAGING=aar

0 commit comments

Comments
 (0)