Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Kotlin to 1.5.0 #176

Merged
merged 1 commit into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import org.jetbrains.dokka.gradle.DokkaTask

plugins {
id("org.jetbrains.dokka")
id("kotlinx-atomicfu") version "0.14.4" apply false
}

subprojects {
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ plugins {
}

dependencies {
implementation(kotlin("gradle-plugin", "1.4.30"))
implementation(kotlin("gradle-plugin", "1.5.0"))
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20")
implementation("com.android.tools.build:gradle:4.1.2")
implementation("com.android.tools.build:gradle:4.1.3")
implementation("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.16.1")
}

kotlinDslPluginOptions {
Expand Down
10 changes: 6 additions & 4 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
object Versions {
const val kotlin = "1.4.30"
const val serialization = "1.1.0"
const val atomicfu = "0.14.4"
const val kotlin = "1.5.0"
const val serialization = "1.2.0"
const val atomicfu = "0.16.1"
const val androidxTest = "1.3.0"
const val googleTruth = "1.1"
const val androidDesugarJdkLibs = "1.1.1"
const val javamath2kmp = "0.3.0"
const val javamath2kmp = "0.4.0"
}

object Libs {
Expand All @@ -14,6 +14,8 @@ object Libs {
const val json = "org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.serialization}"
}

const val atomicfu = "org.jetbrains.kotlinx:atomicfu:${Versions.atomicfu}"

object AndroidxTest {
const val runner = "androidx.test:runner:${Versions.androidxTest}"
const val orchestrator = "androidx.test:orchestrator:${Versions.androidxTest}"
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/multiplatform-library.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ kotlin {
sourceSets {
all {
languageSettings.apply {
enableLanguageFeature("InlineClasses")
useExperimentalAnnotation("kotlin.RequiresOptIn")
progressiveMode = true
}
Expand Down
2 changes: 0 additions & 2 deletions buildSrc/src/main/kotlin/published-library.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ tasks.withType<JavaCompile>().configureEach {

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-XXLanguage:+InlineClasses")
jvmTarget = "1.8"
useIR = true
}
}

Expand Down
16 changes: 2 additions & 14 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.dokka.gradle.DokkaTask

plugins {
`multiplatform-library`
id("kotlinx-atomicfu")
Expand All @@ -16,30 +14,20 @@ kotlin {

dependencies {
implementation(Libs.javamath2kmp)
implementation(Libs.atomicfu)
}
}

val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation(kotlin("test"))
}
}

val jvmTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
implementation(Libs.googleTruth)
}
}
}
}

tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets {
configureEach {
includes.from(file("MODULE.md"))
}
}
}
18 changes: 9 additions & 9 deletions core/src/commonMain/generated/io/islandtime/_Conversions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,44 @@ import kotlin.jvm.JvmName
/**
* Returns this year-month with the precision reduced to the year.
*/
fun YearMonth.toYear(): Year = Year(year)
public fun YearMonth.toYear(): Year = Year(year)

/**
* Returns this date with the precision reduced to the year.
*/
fun Date.toYear(): Year = Year(year)
public fun Date.toYear(): Year = Year(year)

/**
* Returns this date with the precision reduced to the month.
*/
fun Date.toYearMonth(): YearMonth = YearMonth(year, month)
public fun Date.toYearMonth(): YearMonth = YearMonth(year, month)

/**
* Returns this date-time with the precision reduced to the year.
*/
fun DateTime.toYear(): Year = date.toYear()
public fun DateTime.toYear(): Year = date.toYear()

/**
* Returns this date-time with the precision reduced to the month.
*/
fun DateTime.toYearMonth(): YearMonth = date.toYearMonth()
public fun DateTime.toYearMonth(): YearMonth = date.toYearMonth()

/**
* Returns this date-time with the precision reduced to the year.
*/
fun OffsetDateTime.toYear(): Year = dateTime.toYear()
public fun OffsetDateTime.toYear(): Year = dateTime.toYear()

/**
* Returns this date-time with the precision reduced to the month.
*/
fun OffsetDateTime.toYearMonth(): YearMonth = dateTime.toYearMonth()
public fun OffsetDateTime.toYearMonth(): YearMonth = dateTime.toYearMonth()

/**
* Returns this date-time with the precision reduced to the year.
*/
fun ZonedDateTime.toYear(): Year = dateTime.toYear()
public fun ZonedDateTime.toYear(): Year = dateTime.toYear()

/**
* Returns this date-time with the precision reduced to the month.
*/
fun ZonedDateTime.toYearMonth(): YearMonth = dateTime.toYearMonth()
public fun ZonedDateTime.toYearMonth(): YearMonth = dateTime.toYearMonth()
Loading