-
Notifications
You must be signed in to change notification settings - Fork 17
K2 compatibility #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
K2 compatibility #92
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ out/ | |
|
|
||
| # Gradle files | ||
| .gradle/ | ||
| .kotlin/ | ||
| build/ | ||
|
|
||
| # Local configuration file (sdk path, etc) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,14 @@ | ||
| package co.touchlab.crashkios.core | ||
|
|
||
| import kotlin.concurrent.AtomicReference | ||
| import kotlin.experimental.ExperimentalNativeApi | ||
| import kotlin.native.concurrent.freeze | ||
| import kotlin.reflect.KProperty | ||
|
|
||
| @OptIn(FreezingIsDeprecated::class, ExperimentalNativeApi::class) | ||
| actual class ThreadSafeVar<T> actual constructor(target: T) { | ||
| private val atom = AtomicReference(target) | ||
|
|
||
| actual operator fun getValue(thisRef: Any?, property: KProperty<*>): T = atom.value | ||
|
|
||
| actual operator fun setValue(thisRef: Any?, property: KProperty<*>, value: T) { | ||
| if (Platform.memoryModel == MemoryModel.STRICT) { | ||
| value.freeze() | ||
| } | ||
| atom.value = value | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something I'm doing on Kermit is already updating to Gradle 9. It may be worth doing the same on other projects to keep them in sync. What do you think?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep I can try it out. |
||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are already updating this, is there any reason not to go to a
.21version?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine in this case. The main thing is to keep the 2.x as lower as possible for better compat.