-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jurgen
committed
Feb 20, 2020
1 parent
9a410d3
commit 4bc762c
Showing
1 changed file
with
60 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
|
@@ -100,6 +99,10 @@ javadoc { | |
'https://fxmisc.github.io/flowless/javadoc/0.6/', | ||
'https://fxmisc.github.io/wellbehaved/javadoc/0.3/' | ||
] | ||
|
||
if(JavaVersion.current().isJava9Compatible()) { | ||
options.addBooleanOption('html5', true) | ||
} | ||
} | ||
|
||
// use test logging. | ||
|
@@ -187,65 +190,66 @@ 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) | ||
} | ||
|
||
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:[email protected]:FXMisc/RichTextFX.git' | ||
connection 'scm:[email protected]:FXMisc/RichTextFX.git' | ||
developerConnection 'scm:[email protected]: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' | ||
} | ||
} | ||
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:[email protected]:FXMisc/RichTextFX.git' | ||
connection = 'scm:[email protected]:FXMisc/RichTextFX.git' | ||
developerConnection = 'scm:[email protected]: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' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
uploadArchives.onlyIf { doUploadArchives } | ||
signing { | ||
sign publishing.publications.richTextFX | ||
} | ||
|
||
task fatJar(type: Jar, dependsOn: classes) { | ||
appendix = 'fat' | ||
|