Skip to content

Commit

Permalink
Merge pull request #13 from respawn-app/1.3.1
Browse files Browse the repository at this point in the history
1.3.1
  • Loading branch information
Nek-12 authored Dec 26, 2023
2 parents c9c1045 + 1dd3de3 commit 4d96254
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 945 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@ buildscript {
}
}


allprojects {
group = Config.artifactId
version = Config.versionName
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(Config.jvmTarget)
languageVersion.set(Config.kotlinVersion)
freeCompilerArgs.apply {
addAll(Config.jvmCompilerArgs)
}
optIn.addAll(Config.optIns.map { "-opt-in=$it" })
freeCompilerArgs.addAll(Config.jvmCompilerArgs)
optIn.addAll(Config.optIns)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object Config {

const val majorRelease = 1
const val minorRelease = 3
const val patch = 0
const val patch = 1
const val postfix = ""
const val versionName = "$majorRelease.$minorRelease.$patch$postfix"

Expand Down
58 changes: 29 additions & 29 deletions buildSrc/src/main/kotlin/ConfigureMultiplatform.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@file:Suppress("MissingPackageDeclaration", "unused", "UNUSED_VARIABLE", "UndocumentedPublicFunction", "LongMethod")
@file:Suppress("MissingPackageDeclaration", "unused", "UndocumentedPublicFunction", "LongMethod")

import org.gradle.api.Project
import org.gradle.kotlin.dsl.getValue
Expand All @@ -8,7 +8,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
fun Project.configureMultiplatform(
ext: KotlinMultiplatformExtension,
jvm: Boolean = true,
android: Boolean = true,
android: Boolean = false,
linux: Boolean = true,
iOs: Boolean = true,
js: Boolean = true,
Expand Down Expand Up @@ -41,33 +41,33 @@ fun Project.configureMultiplatform(

if (jvm) jvm()

sequence {
if (iOs) {
yield(iosX64())
yield(iosArm64())
yield(iosSimulatorArm64())
}
if (macOs) {
yield(macosArm64())
yield(macosX64())
}
if (tvOs) {
yield(tvosX64())
yield(tvosArm64())
yield(tvosSimulatorArm64())
}
if (watchOs) {
yield(watchosX64())
yield(watchosArm64())
yield(watchosDeviceArm64())
yield(watchosSimulatorArm64())
}
}.forEach {
it.binaries.framework {
binaryOption("bundleId", Config.artifactId)
binaryOption("bundleVersion", Config.versionName)
baseName = Config.artifactId
}
sequence {
if (iOs) {
yield(iosX64())
yield(iosArm64())
yield(iosSimulatorArm64())
}
if (macOs) {
yield(macosArm64())
yield(macosX64())
}
if (tvOs) {
yield(tvosX64())
yield(tvosArm64())
yield(tvosSimulatorArm64())
}
if (watchOs) {
yield(watchosX64())
yield(watchosArm64())
yield(watchosDeviceArm64())
yield(watchosSimulatorArm64())
}
}.forEach {
it.binaries.framework {
binaryOption("bundleId", Config.artifactId)
binaryOption("bundleVersion", Config.versionName)
baseName = Config.artifactId
}
}

sourceSets.apply {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("multiplatform")
id("com.android.library")
// id("com.android.library")
id("maven-publish")
signing
}
Expand All @@ -9,8 +9,8 @@ kotlin {
configureMultiplatform(this)
}

android {
configureAndroidLibrary(this)
}
// android {
// configureAndroidLibrary(this)
// }

publishMultiplatform()
3 changes: 0 additions & 3 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
plugins {
id("pro.respawn.shared-library")
}
android {
namespace = "${Config.namespace}.common"
}
3 changes: 0 additions & 3 deletions coroutines/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ plugins {
id("pro.respawn.shared-library")
id(libs.plugins.atomicfu.id)
}
android {
namespace = "${Config.namespace}.coroutines"
}
dependencies {
commonMainApi(libs.kotlinx.coroutines.core)
commonMainImplementation(libs.kotlinx.atomicfu)
Expand Down
4 changes: 0 additions & 4 deletions datetime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ plugins {
id("pro.respawn.shared-library")
}

android {
namespace = "${Config.namespace}.datetime"
}

dependencies {
commonMainApi(libs.kotlinx.datetime)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package pro.respawn.kmmutils.datetime

import java.time.DayOfWeek
import java.time.Instant
import java.time.LocalTime
import java.time.Month
import java.time.Year
import java.time.ZoneId
Expand Down Expand Up @@ -186,9 +187,16 @@ public val ZonedDateTime.lengthOfMonth: Int get() = month.length(Year.isLeap(yea
/**
* Sets [this]'s time to [time]. Returns a new [ZonedDateTime]
*/
@Deprecated("Time class is deprecated")
public fun ZonedDateTime.withTime(time: Time): ZonedDateTime =
ZonedDateTime.of(year, monthValue, dayOfMonth, time.hour, time.minute, time.second, nano, zone)

/**
* Sets [this]'s time to [time]. Returns a new [ZonedDateTime]
*/
public fun ZonedDateTime.withTime(time: LocalTime): ZonedDateTime =
ZonedDateTime.of(year, monthValue, dayOfMonth, time.hour, time.minute, time.second, nano, zone)

/**
* Sorts [DayOfWeek]s according to the [locale]. I.e. will affect the first value (Monday / Sunday etc.)
*/
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
composeDetektPlugin = "1.3.0"
coroutines = "1.7.3"
datetime = "0.5.0"
dependencyAnalysisPlugin = "1.27.0"
dependencyAnalysisPlugin = "1.28.0"
detekt = "1.23.4"
detektFormattingPlugin = "1.23.4"
dokka = "1.9.10"
gradleAndroid = "8.3.0-alpha17"
gradleAndroid = "8.3.0-alpha18"
gradleDoctorPlugin = "0.9.1"
junit = "4.13.2"
kotest = "5.8.0"
kotest-plugin = "5.8.0"
kotlin = "1.9.21"
kotlin = "1.9.22"
kotlinx-atomicfu = "0.23.1"
turbine = "1.0.0"
versionCatalogUpdatePlugin = "0.8.1"
versionCatalogUpdatePlugin = "0.8.2"
versionsPlugin = "0.50.0"

[libraries]
Expand Down
3 changes: 0 additions & 3 deletions inputforms/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
plugins {
id("pro.respawn.shared-library")
}
android {
namespace = "${Config.namespace}.inputforms"
}
dependencies {
commonMainApi(projects.common)
jvmTestImplementation(libs.bundles.unittest)
Expand Down
Loading

0 comments on commit 4d96254

Please sign in to comment.