From 3627451844c37ef5dde6ee5bcda11b724a29c615 Mon Sep 17 00:00:00 2001 From: Philip Wedemann <22521688+hfhbd@users.noreply.github.com> Date: Sun, 10 Nov 2024 08:46:46 +0100 Subject: [PATCH] Switch to mavencentral publishing portal (#407) --- .github/workflows/AndroidIntegrationTest.yml | 3 - .github/workflows/CD.yml | 9 +-- .github/workflows/CI.yml | 3 - .github/workflows/Docs.yml | 7 +-- build.gradle.kts | 12 +++- gradle.properties | 5 ++ .../src/main/kotlin/dokkaLicensee.gradle.kts | 22 ++++--- gradle/libs.versions.toml | 4 +- kotlin-js-store/yarn.lock | 59 +++++++------------ 9 files changed, 58 insertions(+), 66 deletions(-) diff --git a/.github/workflows/AndroidIntegrationTest.yml b/.github/workflows/AndroidIntegrationTest.yml index 91dab7e..d1a71cb 100644 --- a/.github/workflows/AndroidIntegrationTest.yml +++ b/.github/workflows/AndroidIntegrationTest.yml @@ -6,9 +6,6 @@ on: pull_request: branches: [ main ] -env: - GRADLE_OPTS: -Dorg.gradle.caching=true - jobs: androidIntegrationTest: runs-on: ubuntu-latest diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index d5c6e55..c6e56fc 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -8,9 +8,6 @@ concurrency: group: "cd" cancel-in-progress: false -env: - GRADLE_OPTS: -Dorg.gradle.caching=true - jobs: build: runs-on: macos-latest @@ -28,9 +25,9 @@ jobs: java-version: 21 - uses: gradle/actions/setup-gradle@v4 - name: Publish - run: ./gradlew -Pversion=$version -Dorg.gradle.parallel=false --no-configuration-cache publish :closeAndReleaseStagingRepositories + run: ./gradlew -Pversion=$version publish env: ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_PRIVATE_KEY }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} - ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONARTYPE_APIKEY }} - ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONARTYPE_APITOKEN }} + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_PASSWORD }} diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4e1106f..a0f454a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,9 +6,6 @@ on: pull_request: branches: [ main ] -env: - GRADLE_OPTS: -Dorg.gradle.caching=true - jobs: build: runs-on: macos-latest diff --git a/.github/workflows/Docs.yml b/.github/workflows/Docs.yml index 98de4d7..410f27f 100644 --- a/.github/workflows/Docs.yml +++ b/.github/workflows/Docs.yml @@ -5,9 +5,6 @@ on: types: [created] workflow_dispatch: -env: - GRADLE_OPTS: -Dorg.gradle.caching=true - jobs: build: runs-on: ubuntu-latest @@ -29,11 +26,11 @@ jobs: java-version: 21 - uses: gradle/actions/setup-gradle@v4 - name: Generate Docs - run: ./gradlew :dokkaHtmlMultiModule + run: ./gradlew :dokkaGenerate - name: Upload Docs uses: actions/upload-pages-artifact@v3 with: - path: build/dokka/htmlMultiModule + path: build/dokka/html - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 diff --git a/build.gradle.kts b/build.gradle.kts index 4917c28..ce4839b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,8 +11,16 @@ plugins { id("io.gitlab.arturbosch.detekt") } -tasks.dokkaHtmlMultiModule { - includes.from("README.md") +dependencies { + for (sub in subprojects) { + dokka(sub) + } +} + +dokka { + dokkaPublications.configureEach { + includes.from("README.md") + } } detekt { diff --git a/gradle.properties b/gradle.properties index f4fcfb4..3330590 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,10 +4,15 @@ # kotlin.code.style=official org.gradle.parallel=true +org.gradle.caching=true org.gradle.configuration-cache=true +org.gradle.configuration-cache.parallel=true +org.gradle.unsafe.isolated-projects=false org.gradle.configureondemand=true kotlin.native.ignoreDisabledTargets=true org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g +org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled +org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true group=app.softwork android.useAndroidX=true kotlin.mpp.androidSourceSetLayoutVersion=2 diff --git a/gradle/build-logic/src/main/kotlin/dokkaLicensee.gradle.kts b/gradle/build-logic/src/main/kotlin/dokkaLicensee.gradle.kts index e9a51fb..1f1f2e0 100644 --- a/gradle/build-logic/src/main/kotlin/dokkaLicensee.gradle.kts +++ b/gradle/build-logic/src/main/kotlin/dokkaLicensee.gradle.kts @@ -5,7 +5,7 @@ plugins { id("app.cash.licensee") } -tasks.named("dokkaHtmlPartial") { +dokka { val module = project.name dokkaSourceSets.configureEach { reportUndocumented.set(true) @@ -14,16 +14,22 @@ tasks.named("dokkaHtmlPartial") { File("$module/src/$sourceSetName").takeIf { it.exists() }?.let { sourceLink { localDirectory.set(file("src/$sourceSetName/kotlin")) - remoteUrl.set(uri("https://github.com/hfhbd/kotlinx-uuid/tree/main/$module/src/$sourceSetName/kotlin").toURL()) + remoteUrl.set(uri("https://github.com/hfhbd/kotlinx-uuid/tree/main/$module/src/$sourceSetName/kotlin")) remoteLineSuffix.set("#L") } } - externalDocumentationLink("https://kotlinlang.org/api/kotlinx.serialization/") - externalDocumentationLink( - url = "https://kotlinlang.org/api/kotlinx-datetime/", - packageListUrl = "https://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/package-list", - ) - externalDocumentationLink("https://cashapp.github.io/sqldelight/2.0.2/2.x/") + externalDocumentationLinks { + register("kotlinx.serialization") { + url("https://kotlinlang.org/api/kotlinx.serialization/") + } + register("kotlinx.datetime") { + url("https://kotlinlang.org/api/kotlinx-datetime/") + packageListUrl("https://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/package-list") + } + register("sqldelight") { + url("https://cashapp.github.io/sqldelight/2.0.2/2.x/") + } + } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e82cfab..22cc31a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin = "2.0.21" +kotlin = "2.1.0-RC" serialization = "1.7.3" [libraries] @@ -21,7 +21,7 @@ kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = android = { id = "com.android.application", version = "8.7.2" } binary = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.16.3" } mavencentral = { id = "io.github.hfhbd.mavencentral", version = "0.0.14" } -dokka = { id = "org.jetbrains.dokka", version = "1.9.20" } +dokka = { id = "org.jetbrains.dokka", version = "2.0.0-Beta" } licensee = { id = "app.cash.licensee", version = "1.12.0" } kover = { id = "org.jetbrains.kotlinx.kover", version = "0.8.3" } detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.23.7"} diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index a1c4cee..83c3662 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -92,33 +92,12 @@ dependencies: "@types/node" "*" -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.37.0" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.37.0.tgz#29cebc6c2a3ac7fea7113207bf5a828fdf4d7ef1" - integrity sha512-Piet7dG2JBuDIfohBngQ3rCt7MgO9xCO4xIMKxBThCq5PNRB91IjlJ10eJVwfoNtvTErmxLzwBZ7rHZtbOMmFQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - "@types/estree@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== -"@types/json-schema@*", "@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.8": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -677,7 +656,7 @@ engine.io@~6.5.2: engine.io-parser "~5.2.1" ws "~8.11.0" -enhanced-resolve@^5.17.0: +enhanced-resolve@^5.17.1: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== @@ -1117,10 +1096,10 @@ karma-webpack@5.0.1: minimatch "^9.0.3" webpack-merge "^4.1.5" -karma@6.4.3: - version "6.4.3" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.3.tgz#763e500f99597218bbb536de1a14acc4ceea7ce8" - integrity sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q== +karma@6.4.4: + version "6.4.4" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.4.tgz#dfa5a426cf5a8b53b43cd54ef0d0d09742351492" + integrity sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w== dependencies: "@colors/colors" "1.5.0" body-parser "^1.19.0" @@ -1152,6 +1131,13 @@ kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +kotlin-web-helpers@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kotlin-web-helpers/-/kotlin-web-helpers-2.0.0.tgz#b112096b273c1e733e0b86560998235c09a19286" + integrity sha512-xkVGl60Ygn/zuLkDPx+oHj7jeLR7hCvoNF99nhwXMn8a3ApB4lLiC9pk4ol4NHPjyoCbvQctBqvzUcp8pkqyWw== + dependencies: + format-util "^1.0.5" + loader-runner@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" @@ -1255,10 +1241,10 @@ mkdirp@^0.5.5: dependencies: minimist "^1.2.6" -mocha@10.7.0: - version "10.7.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.0.tgz#9e5cbed8fa9b37537a25bd1f7fb4f6fc45458b9a" - integrity sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA== +mocha@10.7.3: + version "10.7.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752" + integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A== dependencies: ansi-colors "^4.1.3" browser-stdout "^1.3.1" @@ -1856,12 +1842,11 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.93.0: - version "5.93.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.93.0.tgz#2e89ec7035579bdfba9760d26c63ac5c3462a5e5" - integrity sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA== +webpack@5.94.0: + version "5.94.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" + integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== dependencies: - "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.5" "@webassemblyjs/ast" "^1.12.1" "@webassemblyjs/wasm-edit" "^1.12.1" @@ -1870,7 +1855,7 @@ webpack@5.93.0: acorn-import-attributes "^1.9.5" browserslist "^4.21.10" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.0" + enhanced-resolve "^5.17.1" es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0"