Skip to content

Commit

Permalink
[Release] 1.0.3
Browse files Browse the repository at this point in the history
- Migrate to kotlin multiplatform
- Remove deprecated api
  • Loading branch information
zTrap committed Mar 28, 2024
1 parent 0849164 commit ffea692
Show file tree
Hide file tree
Showing 27 changed files with 603 additions and 526 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,4 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

fastlane/readme.md
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018 zTrap
Copyright 2024 zTrap

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Bezier curves creator
The simple helper for build [Bezier curves](https://en.wikipedia.org/wiki/B%C3%A9zier_curve). Fully compatible with projects written in java/kotlin
The simple multiplatform helper for build [Bezier curves](https://en.wikipedia.org/wiki/B%C3%A9zier_curve)

[ ![Download](https://maven-badges.herokuapp.com/maven-central/ru.ztrap/beziercurve/badge.svg) ](https://maven-badges.herokuapp.com/maven-central/ru.ztrap/beziercurve/)

## Install

```gradle
implementation 'ru.ztrap:beziercurve:1.0.2'
implementation 'ru.ztrap:beziercurve:1.0.3'
```

## Usage
Expand All @@ -28,20 +28,16 @@ val curve = BezierCurve(

```kotlin
val point = curve.calculate(progress)
// or
curve.calculate(progress)
val point = curve.point
```

## Developed By

- Peter Gulko
- ztrap.developer@gmail.com
- [paypal.me/zTrap](https://www.paypal.me/zTrap)

## License

Copyright 2021 zTrap
Copyright 2024 zTrap

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
1 change: 0 additions & 1 deletion beziercurve/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions beziercurve/build.gradle

This file was deleted.

116 changes: 0 additions & 116 deletions beziercurve/src/main/kotlin/ru/ztrap/beziercurve/BezierCurve.kt

This file was deleted.

12 changes: 0 additions & 12 deletions beziercurve/src/main/kotlin/ru/ztrap/beziercurve/Point.kt

This file was deleted.

15 changes: 0 additions & 15 deletions beziercurve/src/main/kotlin/ru/ztrap/beziercurve/extensions.kt

This file was deleted.

27 changes: 0 additions & 27 deletions build.gradle

This file was deleted.

53 changes: 53 additions & 0 deletions build.gradle.kts
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")
}
}
7 changes: 7 additions & 0 deletions convention-plugins/build.gradle.kts
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
}
36 changes: 36 additions & 0 deletions convention-plugins/src/main/kotlin/PublishingInfo.kt
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"
}
}
Loading

0 comments on commit ffea692

Please sign in to comment.