Skip to content

Commit

Permalink
Use Java 11 everywhere (#649)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
matt-ramotar and msfjarvis authored Jul 7, 2024
1 parent 48266f4 commit 83e5f8d
Show file tree
Hide file tree
Showing 16 changed files with 92 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/.ci_test_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Set up our JDK environment
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
distribution: zulu
java-version: 11

- name: Upload Artifacts
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 17
java-version: 11
- name: Run tests
run: ./gradlew check --rerun-tasks --stacktrace
- name: Upload code coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
distribution: zulu
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run check with Gradle Wrapper
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@

#### Android
```kotlin
implementation "org.mobilenativefoundation.store:store5:5.1.0-alpha03"
implementation "org.mobilenativefoundation.store:store5:5.1.0-alpha04"
```

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

```kotlin
commonMain {
dependencies {
implementation("org.mobilenativefoundation.store:store5:5.1.0-alpha03")
implementation("org.mobilenativefoundation.store:store5:5.1.0-alpha04")
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ subprojects {
tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
jvmTarget = "11"
}
}

withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_17.name
targetCompatibility = JavaVersion.VERSION_17.name
sourceCompatibility = JavaVersion.VERSION_11.name
targetCompatibility = JavaVersion.VERSION_11.name
}
}

Expand Down
7 changes: 7 additions & 0 deletions cache/api/android/cache.api
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
public final class org/mobilenativefoundation/store/cache/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public abstract interface class org/mobilenativefoundation/store/cache5/Cache {
public abstract fun getAllPresent ()Ljava/util/Map;
public abstract fun getAllPresent (Ljava/util/List;)Ljava/util/Map;
Expand Down
7 changes: 7 additions & 0 deletions core/api/android/core.api
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
public final class org/mobilenativefoundation/store/core/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public abstract interface annotation class org/mobilenativefoundation/store/core5/ExperimentalStoreApi : java/lang/annotation/Annotation {
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G

# POM file
GROUP=org.mobilenativefoundation.store
VERSION_NAME=5.1.0-alpha03
VERSION_NAME=5.1.0-alpha04
POM_PACKAGING=pom
POM_DESCRIPTION = Store5 is a Kotlin Multiplatform network-resilient repository layer

Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
androidMinSdk = "24"
androidCompileSdk = "33"
androidGradlePlugin = "8.2.2"
androidGradlePlugin = "7.4.2"
androidTargetSdk = "33"
atomicFu = "0.24.0"
baseKotlin = "2.0.0"
Expand All @@ -21,7 +21,7 @@ testCore = "1.5.0"
kmmBridge = "0.3.2"
ktlint = "0.39.0"
kover = "0.6.0"
store = "5.1.0-alpha03"
store = "5.1.0-alpha04"
truth = "1.1.3"
binary-compatibility-validator = "0.15.0-Beta.2"

Expand Down
7 changes: 7 additions & 0 deletions multicast/api/android/multicast.api
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
public final class org/mobilenativefoundation/store/multicast/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public final class org/mobilenativefoundation/store/multicast5/Multicaster {
public fun <init> (Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/flow/Flow;ZZLkotlin/jvm/functions/Function2;)V
public synthetic fun <init> (Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/flow/Flow;ZZLkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Expand Down
12 changes: 6 additions & 6 deletions paging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ kotlin {
}
}

jvmToolchain(17)
jvmToolchain(11)
}

android {
namespace = "org.mobilenativefoundation.store.paging5"

sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
targetSdk = 33
targetSdk = 34
}

lint {
Expand All @@ -75,16 +75,16 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
reportUndocumented.set(false)
skipDeprecated.set(true)
jdkVersion.set(17)
jdkVersion.set(11)
}
}

Expand Down
39 changes: 31 additions & 8 deletions paging/kover/coverage.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
<?xml version="1.0" ?>
<report name="Intellij Coverage Report">
<package name="org/mobilenativefoundation/store/paging5">
<class name="org/mobilenativefoundation/store/paging5/BuildConfig" sourcefilename="BuildConfig.java">
<method name="&lt;clinit&gt;" desc="()V">
<counter type="INSTRUCTION" missed="3" covered="0"/>
<counter type="BRANCH" missed="0" covered="0"/>
<counter type="LINE" missed="1" covered="0"/>
</method>
<method name="&lt;init&gt;" desc="()V">
<counter type="INSTRUCTION" missed="2" covered="0"/>
<counter type="BRANCH" missed="0" covered="0"/>
<counter type="LINE" missed="1" covered="0"/>
</method>
<counter type="INSTRUCTION" missed="5" covered="0"/>
<counter type="BRANCH" missed="0" covered="0"/>
<counter type="LINE" missed="2" covered="0"/>
<counter type="METHOD" missed="2" covered="0"/>
</class>
<class name="org/mobilenativefoundation/store/paging5/LaunchPagingStoreKt" sourcefilename="LaunchPagingStore.kt">
<method name="launchPagingStore$lambda$1" desc="(Lorg/mobilenativefoundation/store/store5/MutableStore;Lorg/mobilenativefoundation/store/core5/StoreKey;)Lkotlinx/coroutines/flow/Flow;">
<counter type="INSTRUCTION" missed="0" covered="8"/>
Expand Down Expand Up @@ -260,6 +276,13 @@
<counter type="LINE" missed="0" covered="1"/>
<counter type="METHOD" missed="0" covered="1"/>
</class>
<sourcefile name="BuildConfig.java">
<line nr="6" mi="2" ci="0" mb="0" cb="0"/>
<line nr="7" mi="3" ci="0" mb="0" cb="0"/>
<counter type="INSTRUCTION" missed="5" covered="0"/>
<counter type="BRANCH" missed="0" covered="0"/>
<counter type="LINE" missed="2" covered="0"/>
</sourcefile>
<sourcefile name="LaunchPagingStore.kt">
<line nr="21" mi="0" ci="2" mb="0" cb="0"/>
<line nr="36" mi="0" ci="3" mb="0" cb="0"/>
Expand Down Expand Up @@ -426,11 +449,11 @@
<counter type="BRANCH" missed="11" covered="11"/>
<counter type="LINE" missed="0" covered="119"/>
</sourcefile>
<counter type="INSTRUCTION" missed="41" covered="1702"/>
<counter type="INSTRUCTION" missed="46" covered="1702"/>
<counter type="BRANCH" missed="17" covered="27"/>
<counter type="LINE" missed="2" covered="154"/>
<counter type="METHOD" missed="2" covered="27"/>
<counter type="CLASS" missed="0" covered="19"/>
<counter type="LINE" missed="4" covered="154"/>
<counter type="METHOD" missed="4" covered="27"/>
<counter type="CLASS" missed="1" covered="19"/>
</package>
<package name="org/mobilenativefoundation/store/paging5/util">
<class name="org/mobilenativefoundation/store/paging5/util/FakePostApi" sourcefilename="FakePostApi.kt">
Expand Down Expand Up @@ -1043,10 +1066,10 @@
<counter type="METHOD" missed="13" covered="37"/>
<counter type="CLASS" missed="11" covered="18"/>
</package>
<counter type="INSTRUCTION" missed="284" covered="2284"/>
<counter type="INSTRUCTION" missed="289" covered="2284"/>
<counter type="BRANCH" missed="45" covered="50"/>
<counter type="LINE" missed="39" covered="257"/>
<counter type="METHOD" missed="15" covered="64"/>
<counter type="CLASS" missed="11" covered="37"/>
<counter type="LINE" missed="41" covered="257"/>
<counter type="METHOD" missed="17" covered="64"/>
<counter type="CLASS" missed="12" covered="37"/>
</report>

7 changes: 7 additions & 0 deletions rx2/api/rx2.api
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
public final class org/mobilenativefoundation/store/rx2/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public final class org/mobilenativefoundation/store/rx2/RxFetcherKt {
public static final fun ofFlowable (Lorg/mobilenativefoundation/store/store5/Fetcher$Companion;Lkotlin/jvm/functions/Function1;)Lorg/mobilenativefoundation/store/store5/Fetcher;
public static final fun ofResultFlowable (Lorg/mobilenativefoundation/store/store5/Fetcher$Companion;Lkotlin/jvm/functions/Function1;)Lorg/mobilenativefoundation/store/store5/Fetcher;
Expand Down
7 changes: 7 additions & 0 deletions store/api/android/store.api
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ public final class org/mobilenativefoundation/store/store5/Bookkeeper$DefaultImp
public static synthetic fun setLastFailedSync$default (Lorg/mobilenativefoundation/store/store5/Bookkeeper;Ljava/lang/Object;JLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}

public final class org/mobilenativefoundation/store/store5/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public abstract interface class org/mobilenativefoundation/store/store5/Clear {
}

Expand Down
6 changes: 3 additions & 3 deletions tooling/plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ plugins {
group = "org.mobilenativefoundation.store"

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(11))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class AndroidConventionPlugin : Plugin<Project> {

extensions.configure<LibraryExtension> {

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
targetSdk = 33
targetSdk = 34
}

lint {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ private fun Project.java(action: JavaPluginExtension.() -> Unit) = extensions.co

object Versions {
const val COMPILE_SDK = 34
const val MIN_SDK = 31
const val MIN_SDK = 24
const val TARGET_SDK = 34
const val STORE = "5.1.0-alpha03"
const val STORE = "5.1.0-alpha04"
}


Expand Down

0 comments on commit 83e5f8d

Please sign in to comment.