Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sproctor committed Feb 4, 2024
1 parent 709d85c commit 6f2ca64
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 107 deletions.
26 changes: 13 additions & 13 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@

plugins {
id("org.jetbrains.compose") version "1.3.0"
id("org.jetbrains.compose") version "1.5.12"
id("com.android.application")
kotlin("android")
}

group = "com.godaddy"
version = "1.0"


dependencies {
implementation(project(":color-picker"))
implementation ("androidx.activity:activity-compose:1.6.1")
implementation("com.google.android.material:material:1.7.0")
implementation("androidx.navigation:navigation-runtime-ktx:2.5.3")
implementation("androidx.navigation:navigation-compose:2.5.3")
implementation ("androidx.activity:activity-compose:1.8.2")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.navigation:navigation-runtime-ktx:2.7.6")
implementation("androidx.navigation:navigation-compose:2.7.6")
implementation(compose.material)
}

kotlin {
jvmToolchain(17)
}

android {
compileSdk = 33
namespace = "com.godaddy.android.colorpicker"
compileSdk = 34
defaultConfig {
applicationId = "com.godaddy.android.colorpicker"
minSdk = 21
targetSdk = 33
targetSdk = 34
versionCode = 1
versionName = "1.0"
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
packagingOptions {
packaging {
resources.excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
buildTypes {
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.godaddy.android.colorpicker">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand All @@ -12,7 +11,6 @@
<activity
android:name=".SampleColorPickerActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.ComposeColorPicker.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
classpath("com.android.tools.build:gradle:7.3.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22")
classpath("com.android.tools.build:gradle:8.2.2")
}
}

Expand All @@ -25,6 +25,7 @@ allprojects {

plugins {
id("com.diffplug.spotless") version "6.10.0"
id("org.jetbrains.compose") version "1.5.12" apply false
}

apply("${project.rootDir}/gradle/spotless.gradle")
137 changes: 58 additions & 79 deletions color-picker/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
kotlin("multiplatform")
id("org.jetbrains.dokka") version "1.7.20"
id("org.jetbrains.compose") version "1.3.0"
id("org.jetbrains.dokka") version "1.9.10"
id("org.jetbrains.compose")
id("com.android.library")
id("maven-publish")
id("signing")
}

kotlin {
android("android") {
androidTarget("android") {
publishLibraryVariants("release")
}
jvm()
Expand All @@ -21,45 +21,23 @@ kotlin {
dependencies {
api(compose.runtime)
implementation(compose.material)
implementation("com.github.ajalt.colormath:colormath:3.2.0")
implementation("com.github.ajalt.colormath:colormath:3.4.0")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidTest by getting {
dependencies {
implementation("junit:junit:4.13.2")
}
}
val jvmMain by getting {
dependencies {
implementation(compose.preview)
}
}
val jvmTest by getting
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
jvmToolchain(17)
}

android {
namespace = "com.godaddy.common.colorpicker"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 21
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

val dokkaOutputDir = buildDir.resolve("dokka")
val dokkaOutputDir = layout.buildDirectory.dir("dokka")

tasks.dokkaHtml.configure {
outputDirectory.set(dokkaOutputDir)
Expand All @@ -78,74 +56,75 @@ val javadocJar = tasks.register<Jar>("javadocJar") {
val sonatypeUsername: String? = System.getenv("ORG_GRADLE_PROJECT_mavenCentralUsername")
val sonatypePassword: String? = System.getenv("ORG_GRADLE_PROJECT_mavenCentralPassword")

if (sonatypeUsername != null && sonatypePassword != null) {

afterEvaluate {
configure<PublishingExtension> {
publications.all {
val mavenPublication = this as? MavenPublication
afterEvaluate {
configure<PublishingExtension> {
publications.all {
val mavenPublication = this as? MavenPublication

mavenPublication?.artifactId =
"compose-color-picker${
"-$name".takeUnless { "kotlinMultiplatform" in name }.orEmpty()
}".removeSuffix("Release")
mavenPublication?.artifactId =
"compose-color-picker${
"-$name".takeUnless { "kotlinMultiplatform" in name }.orEmpty()
}".removeSuffix("Release")
}
}
}
}

signing {
setRequired {
// signing is only required if the artifacts are to be published
gradle.taskGraph.allTasks.any { PublishToMavenRepository::class == it.javaClass }
signing {
setRequired {
// signing is only required if the artifacts are to be published
gradle.taskGraph.allTasks.any { PublishToMavenRepository::class == it.javaClass }
}
sign(configurations.archives.get())
sign(publishing.publications)
}
sign(configurations.archives.get())
sign(publishing.publications)
}
publishing {
publishing {

publications.withType(MavenPublication::class) {
groupId = "com.godaddy.android.colorpicker"
artifactId = "compose-color-picker"
version = "0.7.0"
publications.withType(MavenPublication::class) {
groupId = "com.godaddy.android.colorpicker"
artifactId = "compose-color-picker"
version = "0.7.0"

artifact(tasks["javadocJar"])
artifact(tasks["javadocJar"])

pom {
pom {

name.set("compose-color-picker")
description.set("A compose component for picking a color")
url.set("https://github.com/godaddy/compose-color-picker")
name.set("compose-color-picker")
description.set("A compose component for picking a color")
url.set("https://github.com/godaddy/compose-color-picker")

licenses {
license {
name.set("The MIT License (MIT)")
url.set("https://opensource.org/licenses/MIT")
licenses {
license {
name.set("The MIT License (MIT)")
url.set("https://opensource.org/licenses/MIT")
}
}
}
developers {
developer {
id.set("godaddy")
developers {
developer {
id.set("godaddy")
name.set("GoDaddy")
}
}
organization {
name.set("GoDaddy")
}
}
organization {
name.set("GoDaddy")
}
scm {
connection.set("scm:git:git://github.com/godaddy/compose-color-picker.git")
developerConnection.set("scm:git:ssh://[email protected]/godaddy/compose-color-picker.git")
url.set("https://github.com/godaddy/compose-color-picker")
scm {
connection.set("scm:git:git://github.com/godaddy/compose-color-picker.git")
developerConnection.set("scm:git:ssh://[email protected]/godaddy/compose-color-picker.git")
url.set("https://github.com/godaddy/compose-color-picker")
}
}
}
}

repositories {
maven {
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = sonatypeUsername
password = sonatypePassword
repositories {
maven {
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = sonatypeUsername
password = sonatypePassword
}
}
}
}
}

3 changes: 1 addition & 2 deletions desktop/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
kotlin("multiplatform")
id("org.jetbrains.compose") version "1.3.0"
id("org.jetbrains.compose") version "1.5.12"
}

group = "com.godaddy"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -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 execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
2 changes: 1 addition & 1 deletion jsApp/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.3.0"
id("org.jetbrains.compose") version "1.5.12"
}

kotlin {
Expand Down

0 comments on commit 6f2ca64

Please sign in to comment.