-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Migrate to kotlin multiplatform - Remove deprecated api
- Loading branch information
Showing
27 changed files
with
603 additions
and
526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
116 changes: 0 additions & 116 deletions
116
beziercurve/src/main/kotlin/ru/ztrap/beziercurve/BezierCurve.kt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
beziercurve/src/main/kotlin/ru/ztrap/beziercurve/extensions.kt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl | ||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig | ||
|
||
plugins { | ||
alias(libs.plugins.kotlin.multiplatform) | ||
id("convention.publication") | ||
} | ||
|
||
group = PublishingInfo.GROUP | ||
version = PublishingInfo.Artifact.VERSION | ||
|
||
kotlin { | ||
@OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
compilerOptions { | ||
explicitApi() | ||
} | ||
|
||
jvm() | ||
|
||
@OptIn(ExperimentalWasmDsl::class) | ||
wasmJs { | ||
moduleName = PublishingInfo.Artifact.NAME | ||
browser { | ||
commonWebpackConfig { | ||
outputFileName = "${PublishingInfo.Artifact.NAME}.js" | ||
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply { | ||
static = (static ?: mutableListOf()).apply { | ||
// Serve sources to debug inside browser | ||
add(project.projectDir.path) | ||
} | ||
} | ||
} | ||
} | ||
binaries.executable() | ||
} | ||
|
||
listOf( | ||
iosX64(), | ||
iosArm64(), | ||
iosSimulatorArm64() | ||
).forEach { | ||
it.binaries.framework { | ||
baseName = PublishingInfo.Artifact.NAME | ||
isStatic = true | ||
} | ||
} | ||
|
||
//https://kotlinlang.org/docs/native-objc-interop.html#export-of-kdoc-comments-to-generated-objective-c-headers | ||
targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget> { | ||
compilations["main"].compilerOptions.options.freeCompilerArgs.add("-Xexport-kdoc") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
`kotlin-dsl` // Is needed to turn our build logic written in Kotlin into Gralde Plugin | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() // To use 'maven-publish' and 'signing' plugins in our own plugin | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
object PublishingInfo { | ||
const val BASE_ARTIFACT_NAME = "beziercurve" | ||
const val BASE_REPO_BUCKET = "zTrap/$BASE_ARTIFACT_NAME" | ||
const val BASE_REPO_URL = "https://github.com/$BASE_REPO_BUCKET" | ||
|
||
const val GROUP = "ru.ztrap" | ||
|
||
object Repo { | ||
const val URL = BASE_REPO_URL | ||
} | ||
|
||
object Scm { | ||
const val URL = BASE_REPO_URL | ||
const val CONNECTION = "scm:git@github.com:${BASE_REPO_BUCKET}.git" | ||
const val DEV_CONNECTION = "scm:git@github.com:${BASE_REPO_BUCKET}.git" | ||
} | ||
|
||
object License { | ||
const val NAME = "the apache software license, version 2.0" | ||
const val URL = "http://www.apache.org/licenses/license-2.0.txt" | ||
const val DIST = "repo" | ||
} | ||
|
||
object Developer { | ||
const val ID = "ztrap" | ||
const val NAME = "peter gulko" | ||
const val EMAIL = "ztrap.developer@gmail.com" | ||
} | ||
|
||
object Artifact { | ||
const val ID = BASE_ARTIFACT_NAME | ||
const val NAME = "Bezier curves creator" | ||
const val DESCRIPTION = "The simple multiplatform helper for build Bezier curves" | ||
const val VERSION = "1.0.3" | ||
} | ||
} |
Oops, something went wrong.