Skip to content

Commit d7d826b

Browse files
authored
Update Gradle to 10.1 and fix some warnings
1 parent b31c657 commit d7d826b

File tree

11 files changed

+12
-17
lines changed

11 files changed

+12
-17
lines changed

GoTrue/src/settingsMain/kotlin/io/github/jan/supabase/gotrue/SettingsCodeVerifierCache.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.russhwolf.settings.coroutines.toSuspendSettings
1010
* @param settings The [Settings] instance to use. Defaults to [createDefaultSettings].
1111
* @param key The key to use for saving the code verifier.
1212
*/
13+
@OptIn(ExperimentalSettingsApi::class)
1314
class SettingsCodeVerifierCache(
1415
private val settings: Settings = createDefaultSettings(),
1516
private val key: String = SETTINGS_KEY,
@@ -31,20 +32,16 @@ class SettingsCodeVerifierCache(
3132
}
3233
}
3334

34-
@OptIn(ExperimentalSettingsApi::class)
3535
private val suspendSettings = settings.toSuspendSettings()
3636

37-
@OptIn(ExperimentalSettingsApi::class, ExperimentalSettingsApi::class)
3837
override suspend fun saveCodeVerifier(codeVerifier: String) {
3938
suspendSettings.putString(key, codeVerifier)
4039
}
4140

42-
@OptIn(ExperimentalSettingsApi::class)
4341
override suspend fun loadCodeVerifier(): String? {
4442
return suspendSettings.getStringOrNull(key)
4543
}
4644

47-
@OptIn(ExperimentalSettingsApi::class)
4845
override suspend fun deleteCodeVerifier() {
4946
suspendSettings.remove(key)
5047
}

GoTrue/src/settingsMain/kotlin/io/github/jan/supabase/gotrue/SettingsSessionManager.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ private val settingsJson = Json {
2020
* @param key The key to use for saving the session.
2121
* @param json The [Json] instance to use for serialization. Defaults to [settingsJson]. **Important: [JsonBuilder.encodeDefaults] must be set to true.**
2222
*/
23+
@OptIn(ExperimentalSettingsApi::class)
2324
class SettingsSessionManager(
2425
private val settings: Settings = createDefaultSettings(),
2526
private val key: String = SETTINGS_KEY,
@@ -44,12 +45,10 @@ class SettingsSessionManager(
4445

4546
private val suspendSettings = settings.toSuspendSettings()
4647

47-
@OptIn(ExperimentalSettingsApi::class)
4848
override suspend fun saveSession(session: UserSession) {
4949
suspendSettings.putString(key, json.encodeToString(session))
5050
}
5151

52-
@OptIn(ExperimentalSettingsApi::class)
5352
override suspend fun loadSession(): UserSession? {
5453
val session = suspendSettings.getStringOrNull(key) ?: return null
5554
return try {
@@ -60,7 +59,6 @@ class SettingsSessionManager(
6059
}
6160
}
6261

63-
@OptIn(ExperimentalSettingsApi::class)
6462
override suspend fun deleteSession() {
6563
suspendSettings.remove(key)
6664
}

Realtime/src/commonMain/kotlin/io/github/jan/supabase/realtime/RealtimeChannelImpl.kt

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ internal class RealtimeChannelImpl(
160160
)
161161
}
162162

163+
@Suppress("UNCHECKED_CAST")
163164
override fun <T : PostgresAction> RealtimeChannel.postgresChangeFlowInternal(
164165
action: KClass<T>,
165166
schema: String,

Storage/src/settingsMain/kotlin/io/github/jan/supabase/storage/resumable/SettingsResumableCache.kt

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,25 @@ import kotlinx.serialization.json.Json
1212
* A [ResumableCache] implementation using [com.russhwolf.settings.Settings]. This implementation saves the urls on the disk. If you want a memory only cache, use [Memory].
1313
* Unsupported on Linux.
1414
*/
15+
@OptIn(ExperimentalSettingsApi::class)
1516
class SettingsResumableCache(settings: Settings = Settings()) : ResumableCache {
1617

17-
@OptIn(ExperimentalSettingsApi::class)
1818
private val settings = settings.toSuspendSettings()
1919

20-
@OptIn(ExperimentalSettingsApi::class)
2120
override suspend fun set(fingerprint: Fingerprint, entry: ResumableCacheEntry) {
2221
settings.putString(fingerprint.value, Json.encodeToString(entry))
2322
}
2423

25-
@OptIn(ExperimentalSettingsApi::class)
2624
override suspend fun get(fingerprint: Fingerprint): ResumableCacheEntry? {
2725
return settings.getStringOrNull(fingerprint.value)?.let {
2826
Json.decodeFromString(it)
2927
}
3028
}
3129

32-
@OptIn(ExperimentalSettingsApi::class)
3330
override suspend fun remove(fingerprint: Fingerprint) {
3431
settings.remove(fingerprint.value)
3532
}
3633

37-
@OptIn(ExperimentalSettingsApi::class)
3834
override suspend fun clear() {
3935
settings.keys().forEach {
4036
if(it.split(Fingerprint.FINGERPRINT_SEPARATOR).size == Fingerprint.FINGERPRINT_PARTS) remove(Fingerprint(it) ?: error("Invalid fingerprint $it"))

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension
77
val excludedModules = listOf("plugins", "serializers", "test-common")
88

99
fun libraryModules(withBom: Boolean = true, init: Project.() -> Unit) = configure(
10-
allprojects.filter { it.name !in excludedModules && !it.path.contains("sample") && if(withBom) true else it.name != "bom" },
10+
allprojects.filter { it.name !in excludedModules && !it.path.contains("sample") && if(withBom) true else it.name != "bom" && it.name != it.rootProject.name },
1111
init
1212
)
1313

gradle.properties

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ android.useAndroidX=true
33
org.gradle.jvmargs=-Xmx4096m
44
kotlin.mpp.androidSourceSetLayoutVersion=2
55
kotlin.native.ignoreDisabledTargets=true
6-
kotlin.native.ignoreIncorrectDependencies=true
76
org.gradle.parallel=true
87
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning
98

gradle/wrapper/gradle-wrapper.jar

130 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

gradlew.bat

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

sample/multi-factor-auth/common/build.gradle.kts

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ kotlin {
5757
}
5858
}
5959
val desktopMain by getting {
60-
dependsOn(nonJsMain)
6160
dependencies {
6261
api(compose.preview)
6362
}

0 commit comments

Comments
 (0)