diff --git a/.github/workflows/sandbox.yml b/.github/workflows/sandbox.yml index 634bcd2..8d23cd9 100644 --- a/.github/workflows/sandbox.yml +++ b/.github/workflows/sandbox.yml @@ -22,7 +22,6 @@ on: env: GRADLE_OPTS: "-Dorg.gradle.daemon=false" - MONGO_URL: ${{ secrets.MONGO_URL }} jobs: build: @@ -101,6 +100,14 @@ jobs: - name: Run Command if: ${{ startsWith(matrix.os.runner, github.event.inputs.runner) }} + env: + GH_USERNAME: ${{ github.actor }} + GH_PASSWORD: ${{ github.token }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} + ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} + ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} + ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} run: ${{ github.event.inputs.command }} - uses: actions/upload-artifact@v2 diff --git a/build.gradle.kts b/build.gradle.kts index a0edae6..f804081 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ plugins { id("plugin.library-mpp") - id("plugin.publishing-mpp") id("plugin.publishing-nexus") + id("plugin.publishing-mpp") id("com.github.jakemarsden.git-hooks") } diff --git a/buildSrc/src/main/kotlin/plugin.publishing.gradle.kts b/buildSrc/src/main/kotlin/plugin.publishing.gradle.kts index 5fe1c86..cea2152 100644 --- a/buildSrc/src/main/kotlin/plugin.publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/plugin.publishing.gradle.kts @@ -61,36 +61,6 @@ tasks { } publishing { - fun Collection.onlyBuildIf(enabled: Spec) { - forEach { - it.compilations.all { - compileKotlinTask.onlyIf(enabled) - } - } - } - - fun Collection.onlyPublishIf(enabled: Spec) { - val publications: Collection = map { it.name } - afterEvaluate { - publishing { - publications { - matching { it.name in publications }.all { - val targetPublication = this@all - tasks.withType() - .matching { it.publication == targetPublication } - .configureEach { - onlyIf(enabled) - } - tasks.withType() - .matching { it.publication.get() == targetPublication } - .configureEach { - onlyIf(enabled) - } - } - } - } - } - } publications { val ghOwnerId: String = project.properties["gh.owner.id"]!!.toString() val ghOwnerName: String = project.properties["gh.owner.name"]!!.toString() diff --git a/gradle.properties b/gradle.properties index 9ff49aa..6bf5072 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,5 +25,5 @@ group=dev.petuska description=Template for kotlin multiplatform library version=0.0.0 #======================================== Build ========================================= -# linux | osx | windows +# linux | macos | windows project.mainOS=linux \ No newline at end of file