diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5985c94..03f875a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,8 +114,8 @@ jobs: - name: Build uses: eskatos/gradle-command-action@v1 with: - arguments: -i -S --console=plain --no-build-cache assemble - # Unit tests + arguments: -i -S --console=plain --no-build-cache assemble validateTaskProperties + # Unit tests - name: Unit tests uses: eskatos/gradle-command-action@v1 with: @@ -136,4 +136,43 @@ jobs: with: name: Test reports path: "**/build/reports/**" - retention-days: 5 \ No newline at end of file + retention-days: 5 + publish: + runs-on: ubuntu-latest +# on: +# push: +# branches: +# - release + needs: build + if: ${{ github.repository == 'jruby-gradle/jruby-gradle-plugin' && github.ref == 'refs/heads/release' }} + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Cache .gradle/caches + uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle-cache- + - name: Cache .gradle/wrapper + uses: actions/cache@v1 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle-wrapper- + - name: Publish to Gradle Portal + uses: eskatos/gradle-command-action@v1 + env: + PUBLISH_KEY: ${{ secrets.PUBLISH_KEY }} + PUBLISH_SECRET: ${{ secrets.PUBLISH_SECRET }} + with: + arguments: -i --console=plain --no-build-cache assemble publishPlugins -Dgradle.publish.key=$PUBLISH_KEY -Dgradle.publish.secret=$PUBLISH_SECRET + - name: Publish documentation + uses: eskatos/gradle-command-action@v1 + env: + GH_PAGES_PUSH_USER: ${{ secrets.GH_PAGES_PUSH_USER }} + GH_PAGES_PUSH_TOKEN: ${{ secrets.GH_PAGES_PUSH_TOKEN }} + with: + arguments: -i --console=plain --no-build-cache docs:publishGhPages -Dorg.ajoberstar.grgit.auth.username=$GH_PAGES_PUSH_USER -Dorg.ajoberstar.grgit.auth.password=$GH_PAGES_PUSH_TOKEN -Dorg.ajoberstar.grgit.auth.force=hardcoded \ No newline at end of file diff --git a/.sdkmanrc b/.sdkmanrc index 7465e56..ec82621 100644 --- a/.sdkmanrc +++ b/.sdkmanrc @@ -1,3 +1,7 @@ # Enable auto-env through the sdkman_auto_env config # Add key=value pairs of SDKs to use below +<<<<<<< HEAD java=8.0.265.j9-adpt +======= +java=8.0.282.hs-adpt +>>>>>>> 998cb79 (Add sdkmanrc file and set to use JDK8) diff --git a/base-plugin/build.gradle b/base-plugin/build.gradle index 8ff7791..fd71802 100644 --- a/base-plugin/build.gradle +++ b/base-plugin/build.gradle @@ -102,47 +102,17 @@ task installGroovyDoc(type: Copy) { onlyIf { project.hasProperty('jrubyGradleWebsiteInstallDir') } } - -publishing { - publications { - maven(MavenPublication) { -// groupId project.group -// artifactId project.archivesBaseName -// version project.version - - artifact sourcesJar { - classifier "sources" - } - - from components.java +pluginBundle { + plugins { + gradlePlugin { + id = 'com.github.jruby-gradle.base' + displayName = 'JRuby/Gradle base plugin' + description = 'The purpose of plugin is to encapsulate useful Gradle functionality for JRuby projects' + tags = (['jruby']) } } } -bintray { - user = project.bintrayUser - key = project.bintrayKey - publish = true - dryRun = false - publications = ['maven'] - - pkg { - userOrg = 'jruby-gradle' - repo = 'plugins' - name = 'jruby-gradle-plugin' - labels = ['jruby'] - - version { - name = project.version - vcsTag = "v${project.version}" - attributes = ['gradle-plugin': 'com.github.jruby-gradle.base:com.github.jruby-gradle:jruby-gradle-plugin'] - desc = 'The purpose of plugin is to encapsulate useful Gradle functionality for JRuby projects.' - - } - } -} -bintrayUpload.dependsOn assemble - gradleTest.mustRunAfter integrationTest // vim: ft=groovy diff --git a/base-plugin/src/main/groovy/com/github/jrubygradle/GenerateGradleRb.groovy b/base-plugin/src/main/groovy/com/github/jrubygradle/GenerateGradleRb.groovy index e22e77a..260be15 100644 --- a/base-plugin/src/main/groovy/com/github/jrubygradle/GenerateGradleRb.groovy +++ b/base-plugin/src/main/groovy/com/github/jrubygradle/GenerateGradleRb.groovy @@ -100,11 +100,6 @@ class GenerateGradleRb extends DefaultTask implements JRubyAwareTask { getGemInstallDir().absolutePath } - @Input - protected String getGemInstallDirPath() { - getGemInstallDir().absolutePath - } - @TaskAction @CompileDynamic @SuppressWarnings('DuplicateStringLiteral') diff --git a/build.gradle b/build.gradle index 4747125..e80ec27 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,10 @@ plugins { id 'com.gradle.build-scan' version '2.0.2' id 'org.ysb33r.gradletest' version '2.0-rc.4' apply false - id 'com.jfrog.bintray' version '1.8.4' apply false id 'org.ajoberstar.github-pages' version '1.2.0' apply false - id 'org.ysb33r.cloudci.appveyor.testreporter' version '2.5' apply false id 'com.github.hierynomus.license' version '0.14.0' apply false id 'io.ratpack.ratpack-java' version "1.6.1" apply false + id 'com.gradle.plugin-publish' version '0.14.0' apply false } buildScan { @@ -33,8 +32,6 @@ allprojects { } subprojects { - apply plugin: 'maven' - repositories { mavenCentral() gradlePluginPortal() @@ -45,10 +42,8 @@ subprojects { apply plugin: 'java-gradle-plugin' apply plugin: 'groovy' apply plugin: 'codenarc' - apply plugin: 'com.jfrog.bintray' apply plugin: 'org.ysb33r.gradletest' - apply plugin: 'maven-publish' - apply plugin: 'org.ysb33r.cloudci.appveyor.testreporter' + apply plugin: 'com.gradle.plugin-publish' apply from: "${rootProject.projectDir}/gradle/integration-tests.gradle" apply from: "${rootProject.projectDir}/gradle/license.gradle" @@ -93,8 +88,6 @@ subprojects { dependsOn jar } - install.dependsOn check - tasks.withType(Test) { if (gradle.startParameter.isOffline()) { systemProperties 'TESTS_ARE_OFFLINE': '1' diff --git a/core-plugin/build.gradle b/core-plugin/build.gradle index eb9da31..a864b0a 100644 --- a/core-plugin/build.gradle +++ b/core-plugin/build.gradle @@ -18,33 +18,19 @@ artifacts { archives sourcesJar } -bintray { - user = project.bintrayUser - key = project.bintrayKey - publish = true - dryRun = false - configurations = ['archives'] - - pkg { - userOrg = 'jruby-gradle' - repo = 'plugins' - name = 'jruby-gradle-core-plugin' - labels = ['jruby'] - - version { - name = project.version - vcsTag = "v${project.version}" - attributes = ['gradle-plugin': 'com.github.jruby-gradle.core:com.github.jruby-gradle:jruby-gradle-core-plugin'] - desc = 'This plugin provides some core dependency resolution for JRuby/Gradle' +pluginBundle { + plugins { + gradlePlugin { + id = 'com.github.jruby-gradle.core' + displayName = 'JRuby/Gradle core plugin' + description = 'This plugin provides some core dependency resolution for JRuby/Gradle' + tags = (['jruby']) } } } - processResources { filesMatching '**/com.jrubygradle.core-plugin.version.properties', { expand VERSION : project.version } } - -bintrayUpload.dependsOn assemble diff --git a/docs/build.gradle b/docs/build.gradle index 347d365..d066839 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -1,9 +1,7 @@ buildscript { repositories { jcenter() - maven { - url "https://plugins.gradle.org/m2/" - } + gradlePluginPortal() } dependencies { /* wow. so recursion */ @@ -30,7 +28,7 @@ dependencies { } task prepareGroovyDocs(type: Copy) { - description "Copy Groovydocs into our site directory for deploybment/publication" + description "Copy Groovydocs into our site directory for deployment/publication" into "${buildDir}/_site/groovydoc" rootProject.subprojects.each { diff --git a/jar-plugin/build.gradle b/jar-plugin/build.gradle index c306836..7d8b154 100644 --- a/jar-plugin/build.gradle +++ b/jar-plugin/build.gradle @@ -87,32 +87,17 @@ artifacts { archives sourcesJar } -bintray { - user = project.bintrayUser - key = project.bintrayKey - publish = true - dryRun = false - configurations = ['archives'] - - pkg { - userOrg = 'jruby-gradle' - repo = 'plugins' - name = 'jruby-gradle-jar-plugin' - labels = ['jruby'] - - version { - name = project.version - vcsTag = "v${project.version}" - attributes = ['gradle-plugin' : 'com.github.jruby-gradle.jar:com.github.jruby-gradle:jruby-gradle-jar-plugin'] - desc = 'This plugin encapsulates java archive building functionality for JRuby Gradle projects' +pluginBundle { + plugins { + gradlePlugin { + id = 'com.github.jruby-gradle.jar' + displayName = 'JRuby/Gradle base plugin' + description = 'This plugin encapsulates java archive building functionality for JRuby Gradle projects' + tags = (['jruby','fatjar']) } } } -bintrayUpload { - dependsOn assemble -} - gradleTest { dependsOn jar mustRunAfter test, integrationTest diff --git a/war-plugin/build.gradle b/war-plugin/build.gradle index 2f2848b..15a9887 100644 --- a/war-plugin/build.gradle +++ b/war-plugin/build.gradle @@ -5,8 +5,8 @@ dependencies { compile project(':jruby-gradle-plugin') compile group: 'com.github.jruby-gradle', name: 'warbler-bootstrap', version: '0.2.0+' - testCompile (spockVersion) { - exclude module : 'groovy-all' + testCompile(spockVersion) { + exclude module: 'groovy-all' } } @@ -14,27 +14,15 @@ artifacts { archives sourcesJar } -bintray { - user = project.bintrayUser - key = project.bintrayKey - publish = true - dryRun = false - configurations = ['archives'] - - pkg { - userOrg = 'jruby-gradle' - repo = 'plugins' - name = 'jruby-gradle-war-plugin' - labels = ['jruby','war','java'] - - version { - name = project.version - vcsTag = "v${project.version}" - attributes = ['gradle-plugin' : 'com.github.jruby-gradle.war:com.github.jruby-gradle:jruby-gradle-war-plugin'] - desc = project.description +pluginBundle { + plugins { + gradlePlugin { + id = 'com.github.jruby-gradle.jar' + displayName = 'JRuby/Gradle base plugin' + description = 'This plugin encapsulates building deployable WARs using JRuby' + tags = (['jruby', 'war']) } } } -bintrayUpload.dependsOn assemble // vim: ft=groovy