diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index f17045d..746f99a 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -6,23 +6,26 @@ on: pull_request: branches: [ main ] - jobs: dependency-submission: runs-on: ubuntu-latest - permissions: contents: write + env: + GRADLE_OPTS: -Dorg.gradle.caching=true + steps: - - uses: actions/checkout@v4 - - uses: gradle/actions/dependency-submission@v3 - with: - additional-arguments: -Dorg.gradle.unsafe.isolated-projects=false + - uses: actions/checkout@v4 + - uses: gradle/actions/dependency-submission@v3 + with: + additional-arguments: -Dorg.gradle.unsafe.isolated-projects=false + cache-encryption-key: ${{ secrets.CC }} dependency-review: runs-on: ubuntu-latest needs: dependency-submission if: github.event_name == 'pull_request' + steps: - - uses: actions/dependency-review-action@v4 + - uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 471c5c6..513d7c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,5 +20,6 @@ jobs: - uses: gradle/actions/setup-gradle@v3 with: gradle-home-cache-cleanup: true + cache-encryption-key: ${{ secrets.CC }} - name: Build with Gradle run: ./gradlew build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92b6d2d..3718b4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,8 +13,6 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - pages: write - id-token: write packages: write env: @@ -28,7 +26,6 @@ jobs: - name: Set environment for version run: long="${{ github.ref }}"; version=${long#"refs/tags/v"}; echo "version=${version}" >> $GITHUB_ENV - uses: actions/checkout@v4 - - uses: actions/configure-pages@v4 - uses: gradle/actions/setup-gradle@v3 - name: Release maven artifacts @@ -36,12 +33,5 @@ jobs: env: ORG_GRADLE_PROJECT_GitHubPackagesUsername: ${{ github.actor }} ORG_GRADLE_PROJECT_GitHubPackagesPassword: ${{ github.token }} - - - name: Create docs - run: ./gradlew dokkaHtmlMultiModule --no-configuration-cache - - uses: actions/upload-pages-artifact@v3 - with: - path: build/dokka/htmlMultiModule - - name: Deploy Documentation to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} diff --git a/gradle.properties b/gradle.properties index f25cb21..05fe6c4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,5 +4,5 @@ org.gradle.jvmargs=-Xmx2048m org.gradle.configuration-cache=true org.gradle.configureondemand=true org.gradle.unsafe.isolated-projects=true +org.gradle.configuration-cache.problems=warn group=io.github.hfhbd -version=1.0.0 diff --git a/gradle/build-logic/src/main/kotlin/setup.gradle.kts b/gradle/build-logic/src/main/kotlin/setup.gradle.kts index d07bd66..ee034b3 100644 --- a/gradle/build-logic/src/main/kotlin/setup.gradle.kts +++ b/gradle/build-logic/src/main/kotlin/setup.gradle.kts @@ -1,6 +1,7 @@ plugins { kotlin("jvm") id("maven-publish") + id("signing") } kotlin.jvmToolchain(8) @@ -20,3 +21,22 @@ publishing { from(components["java"]) } } + +java { + withJavadocJar() + withSourcesJar() +} + +signing { + val signingKey: String? = project.properties["signingKey"] as String? + val signingPassword: String? = project.properties["signingPassword"] as String? + if (signingKey != null) { + useInMemoryPgpKeys(signingKey, signingPassword) + sign(publishing.publications) + } +} + +tasks.withType().configureEach { + isPreserveFileTimestamps = false + isReproducibleFileOrder = true +}