Skip to content

Commit 83e5f8d

Browse files
Use Java 11 everywhere (#649)
* fix: lower JVM target to Java 11 Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Use Java 11 Signed-off-by: Matt Ramotar <matt.ramotar@uber.com> * Dump APIs * Fix sdk inconsistencies * Reset min sdk to 24 --------- Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Matt Ramotar <matt.ramotar@uber.com> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
1 parent 48266f4 commit 83e5f8d

File tree

16 files changed

+92
-34
lines changed

16 files changed

+92
-34
lines changed

.github/workflows/.ci_test_and_publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- name: Set up our JDK environment
2020
uses: actions/setup-java@v4
2121
with:
22-
distribution: 'temurin'
23-
java-version: 17
22+
distribution: zulu
23+
java-version: 11
2424

2525
- name: Upload Artifacts
2626
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
@@ -56,7 +56,7 @@ jobs:
5656
uses: actions/setup-java@v2
5757
with:
5858
distribution: zulu
59-
java-version: 17
59+
java-version: 11
6060
- name: Run tests
6161
run: ./gradlew check --rerun-tasks --stacktrace
6262
- name: Upload code coverage

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
- name: Setup Java
1010
uses: actions/setup-java@v4
1111
with:
12-
distribution: 'temurin'
13-
java-version: 17
12+
distribution: zulu
13+
java-version: 11
1414
- name: Setup Gradle
1515
uses: gradle/actions/setup-gradle@v3
1616
- name: Run check with Gradle Wrapper

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434

3535
#### Android
3636
```kotlin
37-
implementation "org.mobilenativefoundation.store:store5:5.1.0-alpha03"
37+
implementation "org.mobilenativefoundation.store:store5:5.1.0-alpha04"
3838
```
3939

4040
#### Multiplatform (Common, JVM, Native, JS)
4141

4242
```kotlin
4343
commonMain {
4444
dependencies {
45-
implementation("org.mobilenativefoundation.store:store5:5.1.0-alpha03")
45+
implementation("org.mobilenativefoundation.store:store5:5.1.0-alpha04")
4646
}
4747
}
4848
```

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ subprojects {
5050
tasks {
5151
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
5252
kotlinOptions {
53-
jvmTarget = "17"
53+
jvmTarget = "11"
5454
}
5555
}
5656

5757
withType<JavaCompile>().configureEach {
58-
sourceCompatibility = JavaVersion.VERSION_17.name
59-
targetCompatibility = JavaVersion.VERSION_17.name
58+
sourceCompatibility = JavaVersion.VERSION_11.name
59+
targetCompatibility = JavaVersion.VERSION_11.name
6060
}
6161
}
6262

cache/api/android/cache.api

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
public final class org/mobilenativefoundation/store/cache/BuildConfig {
2+
public static final field BUILD_TYPE Ljava/lang/String;
3+
public static final field DEBUG Z
4+
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
5+
public fun <init> ()V
6+
}
7+
18
public abstract interface class org/mobilenativefoundation/store/cache5/Cache {
29
public abstract fun getAllPresent ()Ljava/util/Map;
310
public abstract fun getAllPresent (Ljava/util/List;)Ljava/util/Map;

core/api/android/core.api

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
public final class org/mobilenativefoundation/store/core/BuildConfig {
2+
public static final field BUILD_TYPE Ljava/lang/String;
3+
public static final field DEBUG Z
4+
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
5+
public fun <init> ()V
6+
}
7+
18
public abstract interface annotation class org/mobilenativefoundation/store/core5/ExperimentalStoreApi : java/lang/annotation/Annotation {
29
}
310

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G
88

99
# POM file
1010
GROUP=org.mobilenativefoundation.store
11-
VERSION_NAME=5.1.0-alpha03
11+
VERSION_NAME=5.1.0-alpha04
1212
POM_PACKAGING=pom
1313
POM_DESCRIPTION = Store5 is a Kotlin Multiplatform network-resilient repository layer
1414

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
androidMinSdk = "24"
33
androidCompileSdk = "33"
4-
androidGradlePlugin = "8.2.2"
4+
androidGradlePlugin = "7.4.2"
55
androidTargetSdk = "33"
66
atomicFu = "0.24.0"
77
baseKotlin = "2.0.0"
@@ -21,7 +21,7 @@ testCore = "1.5.0"
2121
kmmBridge = "0.3.2"
2222
ktlint = "0.39.0"
2323
kover = "0.6.0"
24-
store = "5.1.0-alpha03"
24+
store = "5.1.0-alpha04"
2525
truth = "1.1.3"
2626
binary-compatibility-validator = "0.15.0-Beta.2"
2727

multicast/api/android/multicast.api

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
public final class org/mobilenativefoundation/store/multicast/BuildConfig {
2+
public static final field BUILD_TYPE Ljava/lang/String;
3+
public static final field DEBUG Z
4+
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
5+
public fun <init> ()V
6+
}
7+
18
public final class org/mobilenativefoundation/store/multicast5/Multicaster {
29
public fun <init> (Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/flow/Flow;ZZLkotlin/jvm/functions/Function2;)V
310
public synthetic fun <init> (Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/flow/Flow;ZZLkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V

paging/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ kotlin {
5353
}
5454
}
5555

56-
jvmToolchain(17)
56+
jvmToolchain(11)
5757
}
5858

5959
android {
6060
namespace = "org.mobilenativefoundation.store.paging5"
6161

6262
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
63-
compileSdk = 33
63+
compileSdk = 34
6464

6565
defaultConfig {
6666
minSdk = 24
67-
targetSdk = 33
67+
targetSdk = 34
6868
}
6969

7070
lint {
@@ -75,16 +75,16 @@ android {
7575
}
7676

7777
compileOptions {
78-
sourceCompatibility = JavaVersion.VERSION_17
79-
targetCompatibility = JavaVersion.VERSION_17
78+
sourceCompatibility = JavaVersion.VERSION_11
79+
targetCompatibility = JavaVersion.VERSION_11
8080
}
8181
}
8282

8383
tasks.withType<DokkaTask>().configureEach {
8484
dokkaSourceSets.configureEach {
8585
reportUndocumented.set(false)
8686
skipDeprecated.set(true)
87-
jdkVersion.set(17)
87+
jdkVersion.set(11)
8888
}
8989
}
9090

paging/kover/coverage.xml

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
<?xml version="1.0" ?>
22
<report name="Intellij Coverage Report">
33
<package name="org/mobilenativefoundation/store/paging5">
4+
<class name="org/mobilenativefoundation/store/paging5/BuildConfig" sourcefilename="BuildConfig.java">
5+
<method name="&lt;clinit&gt;" desc="()V">
6+
<counter type="INSTRUCTION" missed="3" covered="0"/>
7+
<counter type="BRANCH" missed="0" covered="0"/>
8+
<counter type="LINE" missed="1" covered="0"/>
9+
</method>
10+
<method name="&lt;init&gt;" desc="()V">
11+
<counter type="INSTRUCTION" missed="2" covered="0"/>
12+
<counter type="BRANCH" missed="0" covered="0"/>
13+
<counter type="LINE" missed="1" covered="0"/>
14+
</method>
15+
<counter type="INSTRUCTION" missed="5" covered="0"/>
16+
<counter type="BRANCH" missed="0" covered="0"/>
17+
<counter type="LINE" missed="2" covered="0"/>
18+
<counter type="METHOD" missed="2" covered="0"/>
19+
</class>
420
<class name="org/mobilenativefoundation/store/paging5/LaunchPagingStoreKt" sourcefilename="LaunchPagingStore.kt">
521
<method name="launchPagingStore$lambda$1" desc="(Lorg/mobilenativefoundation/store/store5/MutableStore;Lorg/mobilenativefoundation/store/core5/StoreKey;)Lkotlinx/coroutines/flow/Flow;">
622
<counter type="INSTRUCTION" missed="0" covered="8"/>
@@ -260,6 +276,13 @@
260276
<counter type="LINE" missed="0" covered="1"/>
261277
<counter type="METHOD" missed="0" covered="1"/>
262278
</class>
279+
<sourcefile name="BuildConfig.java">
280+
<line nr="6" mi="2" ci="0" mb="0" cb="0"/>
281+
<line nr="7" mi="3" ci="0" mb="0" cb="0"/>
282+
<counter type="INSTRUCTION" missed="5" covered="0"/>
283+
<counter type="BRANCH" missed="0" covered="0"/>
284+
<counter type="LINE" missed="2" covered="0"/>
285+
</sourcefile>
263286
<sourcefile name="LaunchPagingStore.kt">
264287
<line nr="21" mi="0" ci="2" mb="0" cb="0"/>
265288
<line nr="36" mi="0" ci="3" mb="0" cb="0"/>
@@ -426,11 +449,11 @@
426449
<counter type="BRANCH" missed="11" covered="11"/>
427450
<counter type="LINE" missed="0" covered="119"/>
428451
</sourcefile>
429-
<counter type="INSTRUCTION" missed="41" covered="1702"/>
452+
<counter type="INSTRUCTION" missed="46" covered="1702"/>
430453
<counter type="BRANCH" missed="17" covered="27"/>
431-
<counter type="LINE" missed="2" covered="154"/>
432-
<counter type="METHOD" missed="2" covered="27"/>
433-
<counter type="CLASS" missed="0" covered="19"/>
454+
<counter type="LINE" missed="4" covered="154"/>
455+
<counter type="METHOD" missed="4" covered="27"/>
456+
<counter type="CLASS" missed="1" covered="19"/>
434457
</package>
435458
<package name="org/mobilenativefoundation/store/paging5/util">
436459
<class name="org/mobilenativefoundation/store/paging5/util/FakePostApi" sourcefilename="FakePostApi.kt">
@@ -1043,10 +1066,10 @@
10431066
<counter type="METHOD" missed="13" covered="37"/>
10441067
<counter type="CLASS" missed="11" covered="18"/>
10451068
</package>
1046-
<counter type="INSTRUCTION" missed="284" covered="2284"/>
1069+
<counter type="INSTRUCTION" missed="289" covered="2284"/>
10471070
<counter type="BRANCH" missed="45" covered="50"/>
1048-
<counter type="LINE" missed="39" covered="257"/>
1049-
<counter type="METHOD" missed="15" covered="64"/>
1050-
<counter type="CLASS" missed="11" covered="37"/>
1071+
<counter type="LINE" missed="41" covered="257"/>
1072+
<counter type="METHOD" missed="17" covered="64"/>
1073+
<counter type="CLASS" missed="12" covered="37"/>
10511074
</report>
10521075

rx2/api/rx2.api

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
public final class org/mobilenativefoundation/store/rx2/BuildConfig {
2+
public static final field BUILD_TYPE Ljava/lang/String;
3+
public static final field DEBUG Z
4+
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
5+
public fun <init> ()V
6+
}
7+
18
public final class org/mobilenativefoundation/store/rx2/RxFetcherKt {
29
public static final fun ofFlowable (Lorg/mobilenativefoundation/store/store5/Fetcher$Companion;Lkotlin/jvm/functions/Function1;)Lorg/mobilenativefoundation/store/store5/Fetcher;
310
public static final fun ofResultFlowable (Lorg/mobilenativefoundation/store/store5/Fetcher$Companion;Lkotlin/jvm/functions/Function1;)Lorg/mobilenativefoundation/store/store5/Fetcher;

store/api/android/store.api

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ public final class org/mobilenativefoundation/store/store5/Bookkeeper$DefaultImp
1414
public static synthetic fun setLastFailedSync$default (Lorg/mobilenativefoundation/store/store5/Bookkeeper;Ljava/lang/Object;JLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
1515
}
1616

17+
public final class org/mobilenativefoundation/store/store5/BuildConfig {
18+
public static final field BUILD_TYPE Ljava/lang/String;
19+
public static final field DEBUG Z
20+
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
21+
public fun <init> ()V
22+
}
23+
1724
public abstract interface class org/mobilenativefoundation/store/store5/Clear {
1825
}
1926

tooling/plugins/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ plugins {
55
group = "org.mobilenativefoundation.store"
66

77
java {
8-
sourceCompatibility = JavaVersion.VERSION_17
9-
targetCompatibility = JavaVersion.VERSION_17
8+
sourceCompatibility = JavaVersion.VERSION_11
9+
targetCompatibility = JavaVersion.VERSION_11
1010

1111
toolchain {
12-
languageVersion.set(JavaLanguageVersion.of(17))
12+
languageVersion.set(JavaLanguageVersion.of(11))
1313
}
1414
}
1515

tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/AndroidConventionPlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ class AndroidConventionPlugin : Plugin<Project> {
2424

2525
extensions.configure<LibraryExtension> {
2626

27-
compileSdk = 33
27+
compileSdk = 34
2828

2929
defaultConfig {
3030
minSdk = 24
31-
targetSdk = 33
31+
targetSdk = 34
3232
}
3333

3434
lint {

tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ private fun Project.java(action: JavaPluginExtension.() -> Unit) = extensions.co
170170

171171
object Versions {
172172
const val COMPILE_SDK = 34
173-
const val MIN_SDK = 31
173+
const val MIN_SDK = 24
174174
const val TARGET_SDK = 34
175-
const val STORE = "5.1.0-alpha03"
175+
const val STORE = "5.1.0-alpha04"
176176
}
177177

178178

0 commit comments

Comments
 (0)