Kotlin / kotlinx-atomicfu

The idiomatic way to use atomic operations in Kotlin
Other
911 stars 58 forks source link

Please provide an example how to use with Gradle Kotlin DSL #150

Open tanmatra opened 4 years ago

tanmatra commented 4 years ago

I'm not a Gradle expert, but after a few attempts, I found out that this example just works. Improvements are welcome.

atomicfu-example.zip

ArcticLampyrid commented 4 years ago

using apply is also okey.

buildscript {
    dependencies {
        classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.14.4")
    }
}
apply(plugin = "kotlinx-atomicfu")
AzimMuradov commented 1 year ago

I think this should be enough. It also uses more resent Gradle API.

plugins {
    kotlin("jvm") version "1.8.10"
    id("org.jetbrains.kotlin.plugin.atomicfu") version "1.8.10"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation("org.jetbrains.kotlinx:atomicfu:0.20.0")
}
ArcticLampyrid commented 1 year ago

I think this should be enough.

I need to wait #205 being merged, or at minimal #74 is needed.