Skip to content

Commit

Permalink
Update to kotlin 1.7.10 (#30)
Browse files Browse the repository at this point in the history
Move to gradle version catalogs and publish all platforms from the same runner.
  • Loading branch information
ajalt authored Sep 13, 2022
1 parent 8604a85 commit 39fdf63
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 33 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
with:
arguments: mingwX64Test :colormath:mingwX64BackgroundTest --stacktrace

deploy-mac-and-linux:
deploy:
needs: [ linux-tests, macos-tests, windows-tests ]
runs-on: macos-latest
steps:
Expand All @@ -64,20 +64,6 @@ jobs:
with:
arguments: publish -PinferVersion=true

deploy-windows:
needs: [ linux-tests, macos-tests, windows-tests ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Fetch git tags
run: git fetch origin +refs/tags/*:refs/tags/*
- name: Deploy to sonatype
uses: eskatos/gradle-command-action@v2
with:
arguments: :colormath:publishMingwX64PublicationToMavenRepository -PinferVersion=true

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Xmx5g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [Unreleased]
### Changed
- Updated Kotlin to 1.7.10

## [3.2.0]
### Added
- `hueOr` extension to colors like `HSV` that returns the color's hue or a fallback value if the hue is undefined.
Expand Down
8 changes: 5 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ buildscript {
}

dependencies {
classpath("com.android.tools.build:gradle:7.0.2")
classpath("com.android.tools.build:gradle:7.2.1")
}
}

@Suppress("DSL_SCOPE_VIOLATION") // https://youtrack.jetbrains.com/issue/KTIJ-19369
plugins {
kotlin("jvm") version "1.6.0"
id("org.jetbrains.dokka") version "1.6.0"
kotlin("multiplatform").version(libs.versions.kotlin).apply(false)
alias(libs.plugins.android.library).apply(false)
alias(libs.plugins.dokka).apply(false)
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion colormath/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ kotlin {
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("io.kotest:kotest-assertions-core:5.0.2")
implementation(libs.kotest)
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions extensions/colormath-ext-android-color/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ android {
compileSdk = 31
defaultConfig {
minSdk = 26
targetSdk = 31
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -26,8 +25,8 @@ android {

dependencies {
api(project(":colormath"))
testImplementation("junit:junit:4.13.2")
testImplementation("org.robolectric:robolectric:4.7.2")
testImplementation(libs.junit)
testImplementation(libs.robolectric)
}

apply(from = "../../gradle/dokka.gradle")
Expand Down
7 changes: 3 additions & 4 deletions extensions/colormath-ext-android-colorint/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ android {
compileSdk = 31
defaultConfig {
minSdk = 16
targetSdk = 31
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -26,9 +25,9 @@ android {

dependencies {
api(project(":colormath"))
api("androidx.annotation:annotation:1.3.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.robolectric:robolectric:4.7.2")
api(libs.androidx.annotation)
testImplementation(libs.junit)
testImplementation(libs.robolectric)
}

apply(from = "../../gradle/dokka.gradle")
Expand Down
7 changes: 3 additions & 4 deletions extensions/colormath-ext-jetpack-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ android {
compileSdk = 31
defaultConfig {
minSdk = 21
targetSdk = 31
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -26,9 +25,9 @@ android {

dependencies {
api(project(":colormath"))
api("androidx.compose.ui:ui-graphics:1.0.2")
testImplementation("junit:junit:4.13.2")
testImplementation("org.robolectric:robolectric:4.4")
api(libs.compose.ui.graphics)
testImplementation(libs.junit)
testImplementation(libs.robolectric)
}

apply(from = "../../gradle/dokka.gradle")
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
VERSION_NAME=3.2.0

kotlin.mpp.stability.nowarn=true

# work around for compose-web bug KT-48273
kotlin.js.webpack.major.version=4

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
33 changes: 33 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,38 @@ rootProject.name = "colormath-root"
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
}

dependencyResolutionManagement {
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
}
versionCatalogs {
create("libs") {
version("kotlin", "1.7.10")

plugin("dokka", "org.jetbrains.dokka").version("1.7.10")

// used in tests
library("kotest", "io.kotest:kotest-assertions-core:5.4.2")

// used in extensions
plugin("android-library", "com.android.library").version("7.2.1")

library("compose-ui-graphics", "androidx.compose.ui:ui-graphics:1.2.1")
library("androidx-annotation", "androidx.annotation:annotation:1.4.0")
library("junit", "junit:junit:4.13.2")
library("robolectric", "org.robolectric:robolectric:4.4")

// used in samples
plugin("compose", "org.jetbrains.compose").version("1.1.1")

}
}
}
2 changes: 1 addition & 1 deletion website/converter/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose") version "1.0.0"
alias(libs.plugins.compose)
}


Expand Down
2 changes: 1 addition & 1 deletion website/gradient/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose") version "1.0.0"
alias(libs.plugins.compose)
}


Expand Down

0 comments on commit 39fdf63

Please sign in to comment.