Skip to content

Commit 5da830b

Browse files
Merge pull request #90 from OneBusAway/release-please--branches--main--changes--next
release: 0.1.0-alpha.34
2 parents 8636bc8 + 5b9d5e2 commit 5da830b

File tree

9 files changed

+84
-27
lines changed

9 files changed

+84
-27
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
lint:
17-
timeout-minutes: 10
17+
timeout-minutes: 15
1818
name: lint
1919
runs-on: ${{ github.repository == 'stainless-sdks/open-transit-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
2020
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
@@ -37,7 +37,7 @@ jobs:
3737
- name: Run lints
3838
run: ./scripts/lint
3939
test:
40-
timeout-minutes: 10
40+
timeout-minutes: 15
4141
name: test
4242
runs-on: ${{ github.repository == 'stainless-sdks/open-transit-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4343
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.33"
2+
".": "0.1.0-alpha.34"
33
}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 0.1.0-alpha.34 (2025-08-01)
4+
5+
Full Changelog: [v0.1.0-alpha.33...v0.1.0-alpha.34](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.33...v0.1.0-alpha.34)
6+
7+
### Bug Fixes
8+
9+
* **client:** r8 support ([dbca2b6](https://github.com/OneBusAway/java-sdk/commit/dbca2b6f65b33feb5dac137c43976ee53adf1586))
10+
11+
12+
### Chores
13+
14+
* **internal:** bump ci test timeout ([6139a45](https://github.com/OneBusAway/java-sdk/commit/6139a454dea5b2df944e1ff9e51ee68102048eb1))
15+
* **internal:** reduce proguard ci logging ([0953534](https://github.com/OneBusAway/java-sdk/commit/09535340857380e8bb7ec1112aafd2b84efb55dc))
16+
317
## 0.1.0-alpha.33 (2025-07-30)
418

519
Full Changelog: [v0.1.0-alpha.32...v0.1.0-alpha.33](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.32...v0.1.0-alpha.33)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-java)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.33)
6-
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.33/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.33)
5+
[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-java)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.34)
6+
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.34/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.34)
77

88
<!-- x-release-please-end -->
99

@@ -15,7 +15,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1515

1616
<!-- x-release-please-start-version -->
1717

18-
The REST API documentation can be found on [developer.onebusaway.org](https://developer.onebusaway.org). Javadocs are available on [javadoc.io](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.33).
18+
The REST API documentation can be found on [developer.onebusaway.org](https://developer.onebusaway.org). Javadocs are available on [javadoc.io](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.34).
1919

2020
<!-- x-release-please-end -->
2121

@@ -26,7 +26,7 @@ The REST API documentation can be found on [developer.onebusaway.org](https://de
2626
### Gradle
2727

2828
```kotlin
29-
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.33")
29+
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.34")
3030
```
3131

3232
### Maven
@@ -35,7 +35,7 @@ implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.33")
3535
<dependency>
3636
<groupId>org.onebusaway</groupId>
3737
<artifactId>onebusaway-sdk-java</artifactId>
38-
<version>0.1.0-alpha.33</version>
38+
<version>0.1.0-alpha.34</version>
3939
</dependency>
4040
```
4141

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88

99
allprojects {
1010
group = "org.onebusaway"
11-
version = "0.1.0-alpha.33" // x-release-please-version
11+
version = "0.1.0-alpha.34" // x-release-please-version
1212
}
1313

1414
subprojects {

onebusaway-sdk-java-core/src/main/resources/META-INF/proguard/onebusaway-sdk-java-core.pro

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Jackson uses reflection and depends heavily on runtime attributes.
2-
-keepattributes
2+
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,*Annotation*
33

44
# Jackson uses Kotlin reflection utilities, which themselves use reflection to access things.
55
-keep class kotlin.reflect.** { *; }
@@ -17,13 +17,13 @@
1717
*;
1818
}
1919

20-
# Jackson uses reflection to access the default constructors of serializers and deserializers.
21-
-keepclassmembers class * extends org.onebusaway.core.BaseSerializer {
22-
<init>();
23-
}
24-
-keepclassmembers class * extends org.onebusaway.core.BaseDeserializer {
25-
<init>();
26-
}
20+
# Jackson uses reified type information to serialize and deserialize our classes (via `TypeReference`).
21+
-keep class com.fasterxml.jackson.core.type.TypeReference { *; }
22+
-keep class * extends com.fasterxml.jackson.core.type.TypeReference { *; }
23+
24+
# Jackson uses reflection to access our class serializers and deserializers.
25+
-keep @com.fasterxml.jackson.databind.annotation.JsonSerialize class org.onebusaway.** { *; }
26+
-keep @com.fasterxml.jackson.databind.annotation.JsonDeserialize class org.onebusaway.** { *; }
2727

2828
# Jackson uses reflection to serialize and deserialize our classes based on their constructors and annotated members.
2929
-keepclassmembers class org.onebusaway.** {

onebusaway-sdk-java-proguard-test/build.gradle.kts

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ plugins {
44
}
55

66
buildscript {
7+
repositories {
8+
google()
9+
}
10+
711
dependencies {
812
classpath("com.guardsquare:proguard-gradle:7.4.2")
13+
classpath("com.android.tools:r8:8.3.37")
914
}
1015
}
1116

@@ -15,7 +20,6 @@ dependencies {
1520
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3")
1621
testImplementation("org.assertj:assertj-core:3.25.3")
1722
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4")
18-
testImplementation("org.junit.platform:junit-platform-console:1.10.1")
1923
}
2024

2125
tasks.shadowJar {
@@ -33,7 +37,6 @@ val proguardJar by tasks.registering(proguard.gradle.ProGuardTask::class) {
3337
outjars(proguardJarPath)
3438
printmapping("${layout.buildDirectory.get()}/proguard-mapping.txt")
3539

36-
verbose()
3740
dontwarn()
3841

3942
val javaHome = System.getProperty("java.home")
@@ -58,17 +61,43 @@ val testProGuard by tasks.registering(JavaExec::class) {
5861
dependsOn(proguardJar)
5962
notCompatibleWithConfigurationCache("ProGuard")
6063

61-
mainClass.set("org.junit.platform.console.ConsoleLauncher")
64+
mainClass.set("org.onebusaway.proguard.ProGuardCompatibilityTest")
6265
classpath = files(proguardJarPath)
66+
}
67+
68+
val r8JarPath = "${layout.buildDirectory.get()}/libs/${project.name}-${project.version}-r8.jar"
69+
val r8Jar by tasks.registering(JavaExec::class) {
70+
group = "verification"
71+
dependsOn(tasks.shadowJar)
72+
notCompatibleWithConfigurationCache("R8")
73+
74+
mainClass.set("com.android.tools.r8.R8")
75+
classpath = buildscript.configurations["classpath"]
76+
6377
args = listOf(
64-
"--classpath", proguardJarPath,
65-
"--scan-classpath",
66-
"--details", "verbose",
78+
"--release",
79+
"--classfile",
80+
"--output", r8JarPath,
81+
"--lib", System.getProperty("java.home"),
82+
"--pg-conf", "./test.pro",
83+
"--pg-conf", "../onebusaway-sdk-java-core/src/main/resources/META-INF/proguard/onebusaway-sdk-java-core.pro",
84+
"--pg-map-output", "${layout.buildDirectory.get()}/r8-mapping.txt",
85+
tasks.shadowJar.get().archiveFile.get().asFile.absolutePath,
6786
)
6887
}
6988

89+
val testR8 by tasks.registering(JavaExec::class) {
90+
group = "verification"
91+
dependsOn(r8Jar)
92+
notCompatibleWithConfigurationCache("R8")
93+
94+
mainClass.set("org.onebusaway.proguard.ProGuardCompatibilityTest")
95+
classpath = files(r8JarPath)
96+
}
97+
7098
tasks.test {
7199
dependsOn(testProGuard)
100+
dependsOn(testR8)
72101
// We defer to the tests run via the ProGuard JAR.
73102
enabled = false
74103
}

onebusaway-sdk-java-proguard-test/src/test/kotlin/org/onebusaway/proguard/ProGuardCompatibilityTest.kt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
package org.onebusaway.proguard
44

55
import com.fasterxml.jackson.module.kotlin.jacksonTypeRef
6+
import kotlin.reflect.full.memberFunctions
7+
import kotlin.reflect.jvm.javaMethod
68
import org.assertj.core.api.Assertions.assertThat
7-
import org.junit.jupiter.api.BeforeAll
89
import org.junit.jupiter.api.Test
910
import org.onebusaway.client.okhttp.OnebusawaySdkOkHttpClient
1011
import org.onebusaway.core.jsonMapper
@@ -14,12 +15,22 @@ internal class ProGuardCompatibilityTest {
1415

1516
companion object {
1617

17-
@BeforeAll
1818
@JvmStatic
19-
fun setUp() {
19+
fun main(args: Array<String>) {
2020
// To debug that we're using the right JAR.
2121
val jarPath = this::class.java.getProtectionDomain().codeSource.location
2222
println("JAR being used: $jarPath")
23+
24+
// We have to manually run the test methods instead of using the JUnit runner because it
25+
// seems impossible to get working with R8.
26+
val test = ProGuardCompatibilityTest()
27+
test::class
28+
.memberFunctions
29+
.asSequence()
30+
.filter { function ->
31+
function.javaMethod?.isAnnotationPresent(Test::class.java) == true
32+
}
33+
.forEach { it.call(test) }
2334
}
2435
}
2536

onebusaway-sdk-java-proguard-test/test.pro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
-keep class org.onebusaway.proguard.** { *; }
33

44
# For the testing framework.
5-
-keep class org.junit.** { *; }
5+
-keep class org.junit.** { *; }
6+
7+
# Many warnings don't apply for our testing purposes.
8+
-dontwarn

0 commit comments

Comments
 (0)