diff --git a/CHANGELOG.md b/CHANGELOG.md index 7637fce6..03e36949 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Change Log ========== +1.2.0 +----- + + - Update ColorMath dependency to 2.0.0 + - Update to Kotlin 1.4.20 + - Update OkHttp to 4.9.0 + - Update ThreeTenBP to 1.5.0 + 1.1.3 ----- diff --git a/build.gradle.kts b/build.gradle.kts index 584b5cea..ec587737 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath(kotlin("gradle-plugin", version = "1.3.72")) + classpath(kotlin("gradle-plugin", version = "1.4.20")) classpath(atomicFU("gradle-plugin")) } } diff --git a/buildSrc/src/main/kotlin/SharedDependencies.kt b/buildSrc/src/main/kotlin/SharedDependencies.kt index 90905279..6ee4d958 100644 --- a/buildSrc/src/main/kotlin/SharedDependencies.kt +++ b/buildSrc/src/main/kotlin/SharedDependencies.kt @@ -2,7 +2,7 @@ import org.gradle.kotlin.dsl.DependencyHandlerScope fun DependencyHandlerScope.coroutines( module: String = "core", - version: String = "1.3.8" + version: String = "1.4.2" ) = "org.jetbrains.kotlinx:kotlinx-coroutines-$module:$version" fun DependencyHandlerScope.retrofit( @@ -17,12 +17,12 @@ fun DependencyHandlerScope.moshi( fun DependencyHandlerScope.okHttp( module: String = "okhttp", - version: String = "4.8.0" + version: String = "4.9.0" ) = "com.squareup.okhttp3:$module:$version" fun DependencyHandlerScope.threeTen( module: String = "threetenbp", - version: String = "1.4.4", + version: String = "1.5.0", includeTimezoneDb: Boolean = false ) = "org.threeten:$module:$version" + (":no-tzdb".takeIf { !includeTimezoneDb }.orEmpty()) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 62d4c053..e708b1c0 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bb8b2fc2..4d9ca164 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index fbd7c515..4f906e0c 100755 --- a/gradlew +++ b/gradlew @@ -130,7 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/gradlew.bat b/gradlew.bat index a9f778a7..ac1b06f9 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -54,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -64,21 +64,6 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line @@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/hue-constructs/build.gradle.kts b/hue-constructs/build.gradle.kts index 9db13d5e..620d610d 100644 --- a/hue-constructs/build.gradle.kts +++ b/hue-constructs/build.gradle.kts @@ -10,7 +10,7 @@ dependencies { implementation(moshi()) kapt(moshi("moshi-kotlin-codegen")) - compile("com.github.ajalt:colormath:1.2.0") + compile("com.github.ajalt.colormath:colormath:2.0.0") compile(threeTen()) testImplementation(jUnit()) diff --git a/hue-constructs/src/main/kotlin/inkapplications/shade/constructs/Coordinates.kt b/hue-constructs/src/main/kotlin/inkapplications/shade/constructs/Coordinates.kt index 16039ecc..a8df57b2 100644 --- a/hue-constructs/src/main/kotlin/inkapplications/shade/constructs/Coordinates.kt +++ b/hue-constructs/src/main/kotlin/inkapplications/shade/constructs/Coordinates.kt @@ -1,6 +1,6 @@ package inkapplications.shade.constructs -import com.github.ajalt.colormath.ConvertibleColor +import com.github.ajalt.colormath.Color import com.squareup.moshi.JsonClass /** @@ -10,7 +10,7 @@ import com.squareup.moshi.JsonClass */ @JsonClass(generateAdapter = true) data class Coordinates(val x: Float, val y: Float) { - constructor(color: ConvertibleColor): this( + constructor(color: Color): this( x = color.xyy().first.toFloat(), y = color.xyy().second.toFloat() ) @@ -21,7 +21,7 @@ data class Coordinates(val x: Float, val y: Float) { * * In the case that this is black. The color will default to a D65 White reference. */ -private fun ConvertibleColor.xyy(default: Pair = 0.31271 to 0.32902): Pair { +private fun Color.xyy(default: Pair = 0.31271 to 0.32902): Pair { with(toXYZ()) { val sum = x + y + z if (sum == 0.0) return default diff --git a/hue-serialization/src/main/kotlin/inkapplications/shade/serialization/ColorTransformer.kt b/hue-serialization/src/main/kotlin/inkapplications/shade/serialization/ColorTransformer.kt index db49f7b8..8b3b4cc1 100644 --- a/hue-serialization/src/main/kotlin/inkapplications/shade/serialization/ColorTransformer.kt +++ b/hue-serialization/src/main/kotlin/inkapplications/shade/serialization/ColorTransformer.kt @@ -1,13 +1,13 @@ package inkapplications.shade.serialization -import com.github.ajalt.colormath.ConvertibleColor +import com.github.ajalt.colormath.Color import com.squareup.moshi.FromJson import com.squareup.moshi.ToJson import inkapplications.shade.constructs.Coordinates object ColorTransformer { @ToJson - fun toCoordinates(color: ConvertibleColor) = Coordinates(color.toXYZ()) + fun toCoordinates(color: Color) = Coordinates(color.toXYZ()) @FromJson fun fromCoordinates(coordinates: Coordinates) = coordinates