Skip to content
Merged
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
114 changes: 57 additions & 57 deletions richtextfx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ buildscript {

plugins {
id 'org.unbroken-dome.test-sets' version '2.1.1'
id 'osgi'
id 'maven-publish'
id 'signing'
}

apply plugin: 'osgi'
apply plugin: 'maven'
apply plugin: 'signing'

group = 'org.fxmisc.richtext'

testSets {
Expand Down Expand Up @@ -187,66 +186,67 @@ artifacts {
archives sourcesJar
}

signing {
sign configurations.archives
}

signArchives.onlyIf {
project.hasProperty('signing.keyId') && project.hasProperty('signing.password') && project.hasProperty('signing.secretKeyRingFile')
}

def doUploadArchives = project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')
publish.onlyIf { doUploadArchives }

if(doUploadArchives) {
uploadArchives {
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
publishing {
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = "${sonatypeUsername}"
password = "${sonatypePassword}"
}
}
}
publications {
richTextFX(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'RichTextFX'
packaging = 'jar'
description = 'Rich-text area for JavaFX'
url = 'https://github.com/FXMisc/RichTextFX/#richtextfx'

scm {
url = 'scm:git@github.com:FXMisc/RichTextFX.git'
connection = 'scm:git@github.com:FXMisc/RichTextFX.git'
developerConnection = 'scm:git@github.com:FXMisc/RichTextFX.git'
}

licenses {
license {
name = 'The BSD 2-Clause License'
url = 'http://opensource.org/licenses/BSD-2-Clause'
distribution = 'repo'
}
license {
name = 'GPLv2 with the Classpath Exception'
url = 'http://www.gnu.org/software/classpath/license.html'
distribution = 'repo'
}
}

developers {
developer {
name = 'Tomas Mikula'
}
}
}
}

snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}

pom.project {
name 'RichTextFX'
packaging 'jar'
description 'Rich-text area for JavaFX'
url 'https://github.com/FXMisc/RichTextFX/#richtextfx'

scm {
url 'scm:git@github.com:FXMisc/RichTextFX.git'
connection 'scm:git@github.com:FXMisc/RichTextFX.git'
developerConnection 'scm:git@github.com:FXMisc/RichTextFX.git'
}

licenses {
license {
name 'The BSD 2-Clause License'
url 'http://opensource.org/licenses/BSD-2-Clause'
distribution 'repo'
}
license {
name 'GPLv2 with the Classpath Exception'
url 'http://www.gnu.org/software/classpath/license.html'
distribution 'repo'
}
}

developers {
developer {
name 'Tomas Mikula'
}
}
}
}
}
}

signing {
sign publishing.publications.richTextFX
}
}

uploadArchives.onlyIf { doUploadArchives }

task fatJar(type: Jar, dependsOn: classes) {
appendix = 'fat'
manifest.attributes( 'Automatic-Module-Name': 'org.fxmisc.richtext', 'Multi-Release': 'true' )
Expand Down