From d7bccaef42faea7e7ade402cbe3f668111fe8706 Mon Sep 17 00:00:00 2001 From: Alexander Shabalin Date: Fri, 1 Mar 2024 21:38:55 +0100 Subject: [PATCH] [K/N] Convert :kotlin-native:Interop:Skia buildscript to kts Use folder structure from the rest of the project and build it by the bootstrap compiler. --- kotlin-native/Interop/Skia/build.gradle | 22 ----------------- kotlin-native/Interop/Skia/build.gradle.kts | 24 +++++++++++++++++++ .../kotlin/native/interop/skia/SkiaIndexer.kt | 0 .../kotlin/native/interop/skia/SkiaPlugin.kt | 0 .../skia/SkiaStubsBuildingContextImpl.kt | 0 5 files changed, 24 insertions(+), 22 deletions(-) delete mode 100644 kotlin-native/Interop/Skia/build.gradle create mode 100644 kotlin-native/Interop/Skia/build.gradle.kts rename kotlin-native/Interop/Skia/src/{main/kotlin => }/org/jetbrains/kotlin/native/interop/skia/SkiaIndexer.kt (100%) rename kotlin-native/Interop/Skia/src/{main/kotlin => }/org/jetbrains/kotlin/native/interop/skia/SkiaPlugin.kt (100%) rename kotlin-native/Interop/Skia/src/{main/kotlin => }/org/jetbrains/kotlin/native/interop/skia/SkiaStubsBuildingContextImpl.kt (100%) diff --git a/kotlin-native/Interop/Skia/build.gradle b/kotlin-native/Interop/Skia/build.gradle deleted file mode 100644 index 74a199c25aa..00000000000 --- a/kotlin-native/Interop/Skia/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2010-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the LICENSE file. - */ - -buildscript { - apply from: "$rootDir/kotlin-native/gradle/kotlinGradlePlugin.gradle" -} - -apply plugin: 'kotlin' - -dependencies { - implementation project(":kotlin-native:Interop:Indexer") - implementation project(":kotlin-native:Interop:StubGenerator") -} - -compileKotlin { - compilerOptions.optIn = [ - "kotlinx.cinterop.BetaInteropApi", - "kotlinx.cinterop.ExperimentalForeignApi", - ] -} diff --git a/kotlin-native/Interop/Skia/build.gradle.kts b/kotlin-native/Interop/Skia/build.gradle.kts new file mode 100644 index 00000000000..f6c5004cb6a --- /dev/null +++ b/kotlin-native/Interop/Skia/build.gradle.kts @@ -0,0 +1,24 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile + +plugins { + kotlin("jvm") +} + +dependencies { + implementation(project(":kotlin-native:Interop:Indexer")) + implementation(project(":kotlin-native:Interop:StubGenerator")) +} + +tasks.withType().configureEach { + compilerOptions.optIn.addAll( + listOf( + "kotlinx.cinterop.BetaInteropApi", + "kotlinx.cinterop.ExperimentalForeignApi", + ) + ) +} + +sourceSets { + "main" { projectDefault() } + "test" { none() } +} \ No newline at end of file diff --git a/kotlin-native/Interop/Skia/src/main/kotlin/org/jetbrains/kotlin/native/interop/skia/SkiaIndexer.kt b/kotlin-native/Interop/Skia/src/org/jetbrains/kotlin/native/interop/skia/SkiaIndexer.kt similarity index 100% rename from kotlin-native/Interop/Skia/src/main/kotlin/org/jetbrains/kotlin/native/interop/skia/SkiaIndexer.kt rename to kotlin-native/Interop/Skia/src/org/jetbrains/kotlin/native/interop/skia/SkiaIndexer.kt diff --git a/kotlin-native/Interop/Skia/src/main/kotlin/org/jetbrains/kotlin/native/interop/skia/SkiaPlugin.kt b/kotlin-native/Interop/Skia/src/org/jetbrains/kotlin/native/interop/skia/SkiaPlugin.kt similarity index 100% rename from kotlin-native/Interop/Skia/src/main/kotlin/org/jetbrains/kotlin/native/interop/skia/SkiaPlugin.kt rename to kotlin-native/Interop/Skia/src/org/jetbrains/kotlin/native/interop/skia/SkiaPlugin.kt diff --git a/kotlin-native/Interop/Skia/src/main/kotlin/org/jetbrains/kotlin/native/interop/skia/SkiaStubsBuildingContextImpl.kt b/kotlin-native/Interop/Skia/src/org/jetbrains/kotlin/native/interop/skia/SkiaStubsBuildingContextImpl.kt similarity index 100% rename from kotlin-native/Interop/Skia/src/main/kotlin/org/jetbrains/kotlin/native/interop/skia/SkiaStubsBuildingContextImpl.kt rename to kotlin-native/Interop/Skia/src/org/jetbrains/kotlin/native/interop/skia/SkiaStubsBuildingContextImpl.kt