Skip to content

Commit

Permalink
Fixed version range style. New publish script. Increased version.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuebner committed Feb 22, 2024
1 parent 04a0b4a commit 6e3ab67
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 30 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ configure(subprojects.findAll {it.file('src').exists()}) {
javadocJar.enabled = false
} else {
apply plugin: 'maven-publish'
apply from: "${rootDir}/gradle/maven-deployment.gradle"
apply plugin: 'signing'
apply from: "${rootDir}/gradle/publishing.gradle"
apply from: "${rootDir}/gradle/manifest-gen.gradle"
}
}
Expand Down
56 changes: 39 additions & 17 deletions gradle/maven-deployment.gradle → gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,33 @@

publishing {
publications {
LocalMavenRepo(MavenPublication) {
mavenJava(MavenPublication) {
from components.java

artifact sourcesJar
artifact javadocJar

pom {
//packaging 'jar'
url = 'https://github.com/eclipse/sprotty-server'
afterEvaluate {
groupId project.group
artifactId project.name
version project.version
if (project.hasProperty('title')) {
name = project.title
description = project.description
}
}
url = 'https://github.com/eclipse-sprotty/sprotty-server'
licenses {
license {
name = 'Eclipse Public License v2.0'
url = 'http://www.eclipse.org/legal/epl-2.0'
}
}
scm {
connection = 'scm:git:[email protected]:eclipse/sprotty-server.git'
developerConnection = 'scm:git:[email protected]:eclipse/sprotty-server.git'
url = '[email protected]:eclipse/sprotty-server.git'
connection = 'scm:git:[email protected]:eclipse-sprotty/sprotty-server.git'
developerConnection = 'scm:git:[email protected]:eclipse-sprotty/sprotty-server.git'
url = '[email protected]:eclipse-sprotty/sprotty-server.git'
}
developers {
developer {
Expand All @@ -53,20 +61,34 @@ publishing {
organizationUrl = 'https://www.sigasi.com/'
}
}
// We need to wait until the project's own build file has been executed
// so we can use the title and description settings for setting up Maven publishing.
afterEvaluate {
if (project.hasProperty('title')) {
name = project.title
description = project.description
}
}
}
}
}

repositories {
maven {
url = "$rootProject.buildDir/maven-repository"
name = "OSSRH"
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
credentials {
username = System.getenv('SONATYPE_USERNAME') ?: ''
password = System.getenv('SONATYPE_PASSWORD') ?: ''
}
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
// use this URL for local testing/debugging purposes
// url = "file:" + file("${rootDir}/build/maven-repository")
}
}

signing {
// Use signing.gnupg.passphrase property to bypass the secret key passphrase
useGpgCmd()
sign publishing.publications.mavenJava
}

javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
}
23 changes: 12 additions & 11 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

version = '1.1.0-SNAPSHOT'
version = '1.2.0-SNAPSHOT'

ext.versions = [
xtext: '2.33.+',
elk: '0.9.+',
xtext: '[2.33,2.34)',
elk: '[0.9,0.10)',
guava: '[32.0.0, 33)',
guice: '7.0.+',
gson: '2.10.+',
jakartaee_api: '10.0.+',
log4j: '1.2.+',
slf4j: '1.7.+',
junit: '4.13.+',
lsp4j: '0.22.+',
jetty: '11.0.+'
guice: '[7.0,7.1)',
gson: '[2.10,2.11)',
jakartaee_api: '[10.0,10.1)',
log4j: '[1.2,1.3)',
slf4j: '[1.7,1.8)',
junit: '[4.13,4.14)',
lsp4j: '[0.22,0.23)',
jetty: '[11.0,11.1)',
jakarta_inject: '[2.0,2.1)'
]
2 changes: 1 addition & 1 deletion org.eclipse.sprotty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ext.title = "Sprotty Diagram API"
description = "Server API for providing sprotty diagrams"

dependencies {
api "jakarta.inject:jakarta.inject-api:2.0.+"
api "jakarta.inject:jakarta.inject-api:${versions.jakarta_inject}"
api "org.eclipse.xtend:org.eclipse.xtend.lib:${versions.xtext}"
api "log4j:log4j:${versions.log4j}"
testImplementation "junit:junit:${versions.junit}"
Expand Down

0 comments on commit 6e3ab67

Please sign in to comment.