Skip to content

Commit

Permalink
Move to in-repo convention plug-in (#3567)
Browse files Browse the repository at this point in the history
  • Loading branch information
serras authored Jan 23, 2025
1 parent 994815b commit e843a55
Show file tree
Hide file tree
Showing 80 changed files with 4,071 additions and 310 deletions.
18 changes: 18 additions & 0 deletions arrow-libs/core/arrow-annotations/api/jvm/arrow-annotations.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public final class arrow/optics/OpticsTarget : java/lang/Enum {
public static final field DSL Larrow/optics/OpticsTarget;
public static final field ISO Larrow/optics/OpticsTarget;
public static final field LENS Larrow/optics/OpticsTarget;
public static final field OPTIONAL Larrow/optics/OpticsTarget;
public static final field PRISM Larrow/optics/OpticsTarget;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public static fun valueOf (Ljava/lang/String;)Larrow/optics/OpticsTarget;
public static fun values ()[Larrow/optics/OpticsTarget;
}

public abstract interface annotation class arrow/optics/optics : java/lang/annotation/Annotation {
public abstract fun targets ()[Larrow/optics/OpticsTarget;
}

public abstract interface annotation class arrow/synthetic : java/lang/annotation/Annotation {
}

16 changes: 6 additions & 10 deletions arrow-libs/core/arrow-annotations/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
id(libs.plugins.android.library.get().pluginId)
id("arrow.kotlin")
alias(libs.plugins.publish)
alias(libs.plugins.spotless)
alias(libs.plugins.dokka)
Expand Down Expand Up @@ -36,10 +33,9 @@ kotlin {
}
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
android {
namespace = "arrow.annotations"
compileSdk = libs.versions.android.compileSdk.get().toInt()
}
56 changes: 56 additions & 0 deletions arrow-libs/core/arrow-atomic/api/jvm/arrow-atomic.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
public final class arrow/atomic/AtomicBoolean {
public fun <init> (Z)V
public final fun compareAndSet (ZZ)Z
public final fun get ()Z
public final fun getAndSet (Z)Z
public final fun getValue ()Z
public final fun set (Z)V
public final fun setValue (Z)V
}

public final class arrow/atomic/AtomicBooleanKt {
public static final fun getAndUpdate (Larrow/atomic/AtomicBoolean;Lkotlin/jvm/functions/Function1;)Z
public static final fun loop (Larrow/atomic/AtomicBoolean;Lkotlin/jvm/functions/Function1;)Ljava/lang/Void;
public static final fun tryUpdate (Larrow/atomic/AtomicBoolean;Lkotlin/jvm/functions/Function1;)Z
public static final fun tryUpdate (Larrow/atomic/AtomicBoolean;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Z
public static final fun update (Larrow/atomic/AtomicBoolean;Lkotlin/jvm/functions/Function1;)V
public static final fun update (Larrow/atomic/AtomicBoolean;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public static final fun updateAndGet (Larrow/atomic/AtomicBoolean;Lkotlin/jvm/functions/Function1;)Z
}

public final class arrow/atomic/AtomicIntKt {
public static final fun getAndUpdate (Ljava/util/concurrent/atomic/AtomicInteger;Lkotlin/jvm/functions/Function1;)I
public static final fun getValue (Ljava/util/concurrent/atomic/AtomicInteger;)I
public static final fun loop (Ljava/util/concurrent/atomic/AtomicInteger;Lkotlin/jvm/functions/Function1;)Ljava/lang/Void;
public static final fun setValue (Ljava/util/concurrent/atomic/AtomicInteger;I)V
public static final fun tryUpdate (Ljava/util/concurrent/atomic/AtomicInteger;Lkotlin/jvm/functions/Function1;)Z
public static final fun tryUpdate (Ljava/util/concurrent/atomic/AtomicInteger;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Z
public static final fun update (Ljava/util/concurrent/atomic/AtomicInteger;Lkotlin/jvm/functions/Function1;)V
public static final fun update (Ljava/util/concurrent/atomic/AtomicInteger;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public static final fun updateAndGet (Ljava/util/concurrent/atomic/AtomicInteger;Lkotlin/jvm/functions/Function1;)I
}

public final class arrow/atomic/AtomicKt {
public static final fun getAndUpdate (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun getValue (Ljava/util/concurrent/atomic/AtomicReference;)Ljava/lang/Object;
public static final fun loop (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)Ljava/lang/Void;
public static final fun setValue (Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/Object;)V
public static final fun tryUpdate (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)Z
public static final fun tryUpdate (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Z
public static final fun update (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)V
public static final fun update (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public static final fun updateAndGet (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
}

public final class arrow/atomic/AtomicLongKt {
public static final fun getAndUpdate (Ljava/util/concurrent/atomic/AtomicLong;Lkotlin/jvm/functions/Function1;)J
public static final fun getValue (Ljava/util/concurrent/atomic/AtomicLong;)J
public static final fun loop (Ljava/util/concurrent/atomic/AtomicLong;Lkotlin/jvm/functions/Function1;)Ljava/lang/Void;
public static final fun setValue (Ljava/util/concurrent/atomic/AtomicLong;J)V
public static final fun tryUpdate (Ljava/util/concurrent/atomic/AtomicLong;Lkotlin/jvm/functions/Function1;)Z
public static final fun tryUpdate (Ljava/util/concurrent/atomic/AtomicLong;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Z
public static final fun update (Ljava/util/concurrent/atomic/AtomicLong;Lkotlin/jvm/functions/Function1;)V
public static final fun update (Ljava/util/concurrent/atomic/AtomicLong;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public static final fun updateAndGet (Ljava/util/concurrent/atomic/AtomicLong;Lkotlin/jvm/functions/Function1;)J
}

16 changes: 5 additions & 11 deletions arrow-libs/core/arrow-atomic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
id(libs.plugins.android.library.get().pluginId)
id("arrow.kotlin")
alias(libs.plugins.publish)
alias(libs.plugins.kotlinx.kover)
alias(libs.plugins.spotless)
Expand Down Expand Up @@ -51,14 +50,9 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
android {
namespace = "arrow.atomic"
compileSdk = libs.versions.android.compileSdk.get().toInt()
}
27 changes: 27 additions & 0 deletions arrow-libs/core/arrow-autoclose/api/jvm/arrow-autoclose.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
public abstract interface class arrow/AutoCloseScope {
public abstract fun autoClose (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public abstract fun install (Ljava/lang/AutoCloseable;)Ljava/lang/AutoCloseable;
public abstract fun onClose (Lkotlin/jvm/functions/Function1;)V
}

public final class arrow/AutoCloseScope$DefaultImpls {
public static fun autoClose (Larrow/AutoCloseScope;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public static fun install (Larrow/AutoCloseScope;Ljava/lang/AutoCloseable;)Ljava/lang/AutoCloseable;
}

public final class arrow/AutoCloseScopeKt {
public static final fun autoCloseScope (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
}

public final class arrow/DefaultAutoCloseScope : arrow/AutoCloseScope {
public fun <init> ()V
public fun autoClose (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public final fun close (Ljava/lang/Throwable;)Ljava/lang/Void;
public fun install (Ljava/lang/AutoCloseable;)Ljava/lang/AutoCloseable;
public fun onClose (Lkotlin/jvm/functions/Function1;)V
}

public final class arrow/ThrowIfFatalKt {
public static final fun throwIfFatal (Ljava/lang/Throwable;)Ljava/lang/Throwable;
}

17 changes: 6 additions & 11 deletions arrow-libs/core/arrow-autoclose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile


plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
id(libs.plugins.android.library.get().pluginId)
id("arrow.kotlin")
alias(libs.plugins.publish)
alias(libs.plugins.kotlinx.kover)
alias(libs.plugins.spotless)
Expand Down Expand Up @@ -46,10 +42,9 @@ kotlin {
}
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
android {
namespace = "arrow.autoclose"
compileSdk = libs.versions.android.compileSdk.get().toInt()
}
2 changes: 1 addition & 1 deletion arrow-libs/core/arrow-cache4k/api/arrow-cache4k.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, watchosArm64, watchosSimulatorArm64, watchosX64]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, wasmJs, watchosArm64, watchosSimulatorArm64, watchosX64]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
17 changes: 6 additions & 11 deletions arrow-libs/core/arrow-cache4k/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile


plugins {
// `java-library`
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.publish)
alias(libs.plugins.kotlinx.kover)
Expand Down Expand Up @@ -41,18 +38,16 @@ kotlin {
}
}

jvm {
withJava()
}
jvm()
js(IR) {
browser()
nodejs()
}
// @OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class) wasmJs {
// browser()
// nodejs()
// d8()
// }
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class) wasmJs {
browser()
nodejs()
d8()
}
// Native: https://kotlinlang.org/docs/native-target-support.html
// -- Tier 1 --
linuxX64()
Expand Down
Loading

0 comments on commit e843a55

Please sign in to comment.