Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v5
with:
distribution: temurin
cache: 'maven'
java-version: '17'

- name: Install dependencies
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
description: 'Release message'
jobs:
build:
runs-on: macos-15
runs-on: macos-latest
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Expand All @@ -36,8 +36,10 @@ jobs:
with:
ref: ${{ github.event.inputs.targetBranch }}
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v5
with:
distribution: temurin
cache: 'maven'
java-version: '17'
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
Expand All @@ -54,8 +56,8 @@ jobs:

- name: change version to release (and commit)
run: |
DEVELOPMENT_VERSION=$RELEASE_VERSION setversion.sh
git -am "Set release version, $RELEASE_VERSION"
DEVELOPMENT_VERSION=$RELEASE_VERSION ./setversion.sh
git commit -am "Set release version, $RELEASE_VERSION"

- name: build natives
run: ./build.sh
Expand All @@ -68,7 +70,7 @@ jobs:

- name: change version to next dev (and commit)
run: |
DEVELOPMENT_VERSION=NEXT_DEVELOPMENT_VERSION setversion.sh
DEVELOPMENT_VERSION=$NEXT_DEVELOPMENT_VERSION ./setversion.sh
git commit -am "Set next development version, $NEXT_DEVELOPMENT_VERSION"

- name: Configure AWS Credentials
Expand All @@ -79,10 +81,10 @@ jobs:
aws-region: eu-west-3

- name: Deploy idea plugin
run: aws s3 sync ./plugins/idea/build/distributions/ s3://${{ secrets.AWS_BUCKET }}/tmp_snapshots/idea --acl public-read --follow-symlinks --delete
run: aws s3 sync ./plugins/idea/build/distributions/ s3://${{ secrets.AWS_BUCKET }}/releases/idea --acl public-read --follow-symlinks --delete

- name: Deploy eclipse plugin
run: aws s3 sync ./plugins/eclipse/update-site/target/repository/ s3://${{ secrets.AWS_BUCKET }}/tmp_snapshots/eclipse --acl public-read --follow-symlinks --delete
run: aws s3 sync ./plugins/eclipse/update-site/target/repository/ s3://${{ secrets.AWS_BUCKET }}/releases/eclipse --acl public-read --follow-symlinks --delete

- name: Create a draft release
uses: ncipollo/release-action@v1
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v5
with:
distribution: temurin
cache: 'maven'
java-version: '17'
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
set -e
mvn -T 10 clean install
./plugins/idea/gradlew -b plugins/idea/build.gradle clean buildPlugin
mvn -f plugins/eclipse/pom.xml clean install
mvn -T 10 -f plugins/eclipse/pom.xml clean install
./plugins/gradle/gradlew -b plugins/gradle/build.gradle clean assemble validatePlugins publishToMavenLocal
125 changes: 82 additions & 43 deletions plugins/gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'maven-publish'
id "org.jreleaser" version "1.20.0"
id 'signing'
id 'eclipse'
}

ext {
roboVMVersion = '2.3.24-SNAPSHOT'
nexusUsername = System.getenv('MAVEN_USERNAME')
nexusPassword = System.getenv('MAVEN_PASSWORD')
}

group = 'com.mobidevelop.robovm'
archivesBaseName = 'robovm-gradle-plugin'
version = '2.3.24-SNAPSHOT'
version "${roboVMVersion}"


sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand All @@ -20,12 +27,6 @@ compileJava {
options.compilerArgs.addAll(['--release', '8'])
}

ext {
roboVMVersion = '2.3.24-SNAPSHOT'
nexusUsername = System.getenv('MAVEN_USERNAME')
nexusPassword = System.getenv('MAVEN_PASSWORD')
}

repositories {
mavenLocal()
mavenCentral()
Expand Down Expand Up @@ -60,50 +61,88 @@ gradlePlugin {
}

publishing {
publications {
pluginMaven(MavenPublication) {
pom {
name = 'RoboVM Gradle Plugin'
packaging = 'jar'
description = 'The RoboVM Gradle Plugin provides a way to build RoboVM apps using Gradle.'
url = 'https://github.com/mobidevelop/robovm/'
inceptionYear = '2013'

scm {
url = 'https://github.com/mobidevelop/robovm.git'
connection = 'scm:git:git://github.com/mobidevelop/robovm.git'
developerConnection = 'scm:git:[email protected]:mobidevelop/robovm.git'
}
// TODO: while not pushing to Gradle Plugin Portal but to Maven Central we need
// to have complete POM with all fields to pass Cental validation
// there is no way to configure URLs etc in gradlePlugin {} blocks,
// so override both plugin marker's and plugin's POM in configureEach
// instead of single `pluginMaven(MavenPublication)`
publications.withType(MavenPublication).configureEach {
pom {
name = 'RoboVM Gradle Plugin'
description = 'The RoboVM Gradle Plugin provides a way to build RoboVM apps using Gradle.'
url = 'https://github.com/mobidevelop/robovm/'
inceptionYear = '2013'

scm {
url = 'https://github.com/mobidevelop/robovm.git'
connection = 'scm:git:git://github.com/mobidevelop/robovm.git'
developerConnection = 'scm:git:[email protected]:mobidevelop/robovm.git'
}

licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
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 = 'jtakakura'
name = 'Junji Takakura'
}
developer {
id = 'ntherning'
name = 'Niklas Therning'
}
developers {
developer {
id = 'jtakakura'
name = 'Junji Takakura'
}
developer {
id = 'ntherning'
name = 'Niklas Therning'
}
}
}
}
repositories {
if (project.version.toString().endsWith("-SNAPSHOT")) {
// snapshots are going to sonatype
maven {
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
}
} else {
// local staging repository for JReleaser
maven {
url = uri(layout.buildDirectory.dir("staging-deploy"))
}
}
}
}


// https://central.sonatype.org/publish/publish-portal-gradle/
jreleaser {
signing {
setActive("ALWAYS")
armored = true
}
deploy {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://central.sonatype.com/repository/maven-snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD") }
mavenCentral {
create("sonatype") {
setActive("RELEASE")
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
url = "https://central.sonatype.com/api/v1/publisher"
stagingRepository("build/staging-deploy")
setStage("UPLOAD") // OTHERWISE it will do "publish"
}
}
}
}
release {
github {
skipRelease = true
token = "-" // must be not blank
}
}
}
Expand All @@ -127,7 +166,7 @@ tasks.withType(Javadoc) {

signing {
required { !version.endsWith('SNAPSHOT') && gradle.taskGraph.hasTask("publish") }
sign publishing.publications.pluginMaven
sign publishing.publications.matching { it instanceof MavenPublication }
}

assemble.dependsOn('shadowJar')
Expand Down
2 changes: 1 addition & 1 deletion plugins/gradle/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions plugins/junit/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<version>2.3.24-SNAPSHOT</version>
</parent>

<name>RoboVM JUnit Client</name>
<artifactId>robovm-junit-client</artifactId>
<packaging>jar</packaging>

Expand Down
1 change: 1 addition & 0 deletions plugins/junit/protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<version>2.3.24-SNAPSHOT</version>
</parent>

<name>RoboVM JUnit Protocol</name>
<artifactId>robovm-junit-protocol</artifactId>
<packaging>jar</packaging>

Expand Down
1 change: 1 addition & 0 deletions plugins/junit/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<version>2.3.24-SNAPSHOT</version>
</parent>

<name>RoboVM JUnit Server</name>
<artifactId>robovm-junit-server</artifactId>
<packaging>jar</packaging>

Expand Down
2 changes: 1 addition & 1 deletion plugins/maven/plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<version>3.15.2</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
<goalPrefix>robovm</goalPrefix>
Expand Down
1 change: 1 addition & 0 deletions plugins/maven/surefire/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<version>2.3.24-SNAPSHOT</version>
</parent>

<name>RoboVM Surfire Provider</name>
<artifactId>robovm-surefire-provider</artifactId>
<packaging>jar</packaging>

Expand Down
1 change: 1 addition & 0 deletions plugins/resolver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<robovm.version>${project.version}</robovm.version>
</properties>

<name>RoboVM Maven Resolver</name>
<artifactId>robovm-maven-resolver</artifactId>
<packaging>jar</packaging>

Expand Down
25 changes: 17 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@


<properties>
<sonatypeOssDistMgmtSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -72,6 +71,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -320,13 +323,8 @@
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<!-- end of: entries from sonatype oss-parent-->

Expand Down Expand Up @@ -402,7 +400,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.2.4</version>
</plugin>

<plugin>
Expand Down Expand Up @@ -474,6 +472,17 @@
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
</plugin>
<!-- Central publishing -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>sonatype-nexus-snapshots</publishingServerId>
<autoPublish>false</autoPublish>
</configuration>
</plugin>
</plugins>
</pluginManagement>

Expand Down
Loading
Loading