diff --git a/build.gradle b/build.gradle index 72265c8..89a4895 100644 --- a/build.gradle +++ b/build.gradle @@ -1,26 +1,17 @@ - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5' - } +plugins { + id("io.github.gradle-nexus.publish-plugin") version "1.3.0" + id "signing" + id "groovy" + id "eclipse" + id "maven-publish" } -apply plugin: 'groovy' -apply plugin: 'signing' -apply plugin: 'eclipse' -apply plugin: 'com.jfrog.bintray' -apply plugin: 'maven-publish' - - repositories { mavenCentral() } group = 'org.standardout' -version = '1.9.0-SNAPSHOT' +version = '2.0.0-SNAPSHOT' sourceCompatibility = '1.8' targetCompatibility = '1.8' @@ -37,75 +28,25 @@ dependencies { implementation 'biz.aQute.bnd:biz.aQute.bndlib:5.2.0' implementation 'org.osgi:osgi.core:6.0.0' implementation 'commons-io:commons-io:2.4' - implementation 'de.undercouch:gradle-download-task:3.1.1' + implementation 'de.undercouch:gradle-download-task:5.5.0' implementation localGroovy() } -wrapper { - gradleVersion = '5.3' +tasks.wrapper { + distributionType = Wrapper.DistributionType.ALL + gradleVersion = '8.4' } // package groovydoc into a jar file task packageJavadoc(type: Jar, dependsOn: 'groovydoc') { from groovydoc.destinationDir - classifier = 'javadoc' + archiveClassifier = 'javadoc' } // package source into a jar file task packageSources(type: Jar) { from sourceSets.main.allSource - classifier = 'sources' -} - -// define artifacts for upload -artifacts { - archives jar - archives packageJavadoc - archives packageSources -} - -def configurePom(def pom) { - // ensure correct artifact ID - pom.artifactId = 'bnd-platform' - - // pom file details - pom.project { - name 'bnd-platform' - packaging 'jar' - description 'Build OSGi bundles and Eclipse Update Sites from existing JARs, e.g. from Maven repositories (Plugin for Gradle)' - url 'https://github.com/stempler/bnd-platform' - - scm { - url 'scm:git:https://github.com/stempler/bnd-platform.git' - connection 'scm:git:https://github.com/stempler/bnd-platform.git' - developerConnection 'scm:git:https://github.com/stempler/bnd-platform.git' - } - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'stempler' - name 'Simon Templer' - email 'simon@templer.cc' - } - } - } -} - -// sign all artifacts -signing { - required { - // NOTE: skipping does only work if no gradle properties specifying the key are present - gradle.taskGraph.hasTask('uploadArchives') - } - sign configurations.archives + archiveClassifier = 'sources' } // groovydoc task work-around @@ -120,85 +61,56 @@ dependencies { jansi 'org.fusesource.jansi:jansi:1.11' } -// bintray - -bintray { // task bintrayUpload - user = project.getProperty('bintrayUser') - key = project.getProperty('bintrayApiKey') - - configurations = ['archives'] - - dryRun = false - publish = !project.version.endsWith('-SNAPSHOT') - pkg { - def githubUrl = 'https://github.com/stempler/bnd-platform' - repo = 'gradle-plugins' - name = 'bnd-platform' - desc = 'Build OSGi bundles and p2 repositories / Eclipse Update Sites from existing libraries and their dependencies, e.g. from Maven repositories. Useful for instance for creating a target platform for Eclipse/Equinox or Maven Tycho build from third party dependencies.' - websiteUrl = githubUrl - issueTrackerUrl = "$githubUrl/issues" - vcsUrl = "${githubUrl}.git" - licenses = ['Apache-2.0'] - labels = ['gradle', 'bnd', 'osgi', 'p2', 'eclipse', 'tycho'] - publicDownloadNumbers = true - // version descriptor - version { - name = project.version - attributes = ['gradle-plugin': "org.standardout.bnd-platform:${project.group}:bnd-platform"] - } +nexusPublishing { + repositories { + sonatype() } - } publishing { - repositories { - maven { - url = this.version.endsWith('-SNAPSHOT') ? 'https://oss.sonatype.org/content/repositories/snapshots' : 'https://oss.sonatype.org/service/local/staging/deploy/maven2' - credentials { - username = this.hasProperty('sonatypeUsername') ? sonatypeUsername : '' - password = this.hasProperty('sonatypePassword') ? sonatypePassword : '' - } - } - } - publications { - MyPublication(MavenPublication) { - from components.java - groupId "${group}" - artifactId 'bnd-platform' - version "${version}" - - artifact packageSources - artifact packageJavadoc - - pom { - name = 'bnd-platform' - packaging = 'jar' - description = 'Build OSGi bundles and Eclipse Update Sites from existing JARs, e.g. from Maven repositories (Plugin for Gradle)' - url = 'https://github.com/stempler/bnd-platform' - - scm { - url = 'scm:git:https://github.com/stempler/bnd-platform.git' - connection = 'scm:git:https://github.com/stempler/bnd-platform.git' - developerConnection = 'scm:git:https://github.com/stempler/bnd-platform.git' - } - - licenses { - license { - name = 'The Apache Software License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution = 'repo' - } - } - - developers { - developer { - id = 'stempler' - name = 'Simon Templer' - email = 'simon@templer.cc' - } - } - } - } - } + publications { + mavenJava(MavenPublication) { + from components.java + groupId "${group}" + artifactId 'bnd-platform' + version "${version}" + + artifact packageSources + artifact packageJavadoc + + pom { + name = 'bnd-platform' + packaging = 'jar' + description = 'Build OSGi bundles and Eclipse Update Sites from existing JARs, e.g. from Maven repositories (Plugin for Gradle)' + url = 'https://github.com/stempler/bnd-platform' + + scm { + url = 'scm:git:https://github.com/stempler/bnd-platform.git' + connection = 'scm:git:https://github.com/stempler/bnd-platform.git' + developerConnection = 'scm:git:https://github.com/stempler/bnd-platform.git' + } + + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution = 'repo' + } + } + + developers { + developer { + id = 'stempler' + name = 'Simon Templer' + email = 'simon@templer.cc' + } + } + } + } + } } +// sign all artifacts +signing { + sign publishing.publications.mavenJava +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d3b8398..5c2d1cf 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 838e6bc..e411586 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index cccdd3d..b0d6d0a 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index f955316..9991c50 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome