Skip to content

Commit

Permalink
Multiple updates:
Browse files Browse the repository at this point in the history
- Check Java11 compatibility
- Add minimum POM to JAR file
- Dependency updates
  • Loading branch information
aalmiray committed Sep 27, 2018
1 parent a86b18a commit 84f4fdc
Show file tree
Hide file tree
Showing 40 changed files with 382 additions and 198 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ before_script:
script: ./gradlew clean build
jdk:
- oraclejdk8
- oraclejdk9
env: TERM=dumb
55 changes: 47 additions & 8 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
= JSilhouette
:linkattrs:
:project-owner: aalmiray
:project-repo: kordamp
:project-name: jsilhouette
:project-group: org.kordamp.jsilhouette
:project-owner: aalmiray
:project-repo: kordamp
:project-name: jsilhouette
:project-group: org.kordamp.jsilhouette
:project-version: 0.3.0

image:http://img.shields.io/travis/aalmiray/{project-name}/master.svg["Build Status (travis)", link="https://travis-ci.org/aalmiray/{project-name}"]
image:http://img.shields.io/badge/license-ASL2-blue.svg["ASL2 Licensed", link="http://opensource.org/licenses/ASL2"]
Expand All @@ -17,17 +18,55 @@ JSilhouette provides additional shapes for Java applications. Currently JavaFX i

== Installing

You can get the latest version of **JSilhouette** directly from link:https://bintray.com[Bintray's JCenter] repository.
You can get the latest version of **JSilhouette** directly from link:https://bintray.com[Bintray's JCenter] repository or Maven Central.

[source,groovy]
[subs="attributes"]
.gradle
----
repositories {
jcenter()
}
dependencies {
compile '{project-group}:jsilhouette-javafx:{project-version}'
}
----

[source,xml]
[subs="attributes,verbatim"]
.maven
----
<dependencies>
<dependency>
<groupId>{project-group}</groupId>
<artifactId>jsilhouette-javafx</artifactId>
<version>{project-version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>central</id>
<name>jcenter</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
----

Refer to the link:http://aalmiray.github.io/jsilhouette/[guide, window="_blank"] for further information on configuration
and usage.

=== Java 9+

JSilhouette can be used in a modular fashion when running in Java9+. It's module name is `org.kordamp.jsilhouette.javafx`.

== Building

You must meet the following requirements:

* JDK8u40 as a minimum
* Gradle 4.4
* JDK8u60 as a minimum
* Gradle 4.10

You may used the included gradle wrapper script if you don't have `gradle` installed.

Expand All @@ -45,7 +84,7 @@ You may used the included gradle wrapper script if you don't have `gradle` insta

. Follow the instructions found at http://sdkman.io/ to install SDKMAN.
. You need a POSIX environment if running Windows. We recommend using Babun Shell (http://babun.github.io/)
. Once SDKMAN is installed invoke `sdk install gradle 2.10`.
. Once SDKMAN is installed invoke `sdk install gradle 4.10`.
. Test your setup by invoking `gradle --version`.

.Gdub
Expand Down
57 changes: 27 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 the original author or authors.
* Copyright 2015-2018 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.
Expand All @@ -23,19 +23,16 @@ buildscript {
}

dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'org.ajoberstar:gradle-git:1.7.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'org.ajoberstar:gradle-git-publish:0.3.2'
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.2'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'net.nemerosa:versioning:2.6.1'
classpath 'org.kordamp.gradle:jdeps-gradle-plugin:0.2.0'
classpath 'gradle.plugin.net.ossindex:ossindex-gradle-plugin:0.1.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath 'net.nemerosa:versioning:2.7.1'
}
}

apply plugin: 'org.ajoberstar.github-pages'
apply plugin: 'org.ajoberstar.git-publish'
apply plugin: 'net.nemerosa.versioning'

Date buildTimeAndDate = new Date()
Expand All @@ -44,15 +41,14 @@ ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
buildRevision = versioning.info.commit
buildCreatedBy = "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString()
buildJdk = "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString()
buildCreatedBy = "Gradle ${gradle.gradleVersion}"
}

allprojects {
apply plugin: 'base'
apply plugin: 'idea'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'net.ossindex.audit'
apply plugin: 'org.kordamp.jdeps'

repositories {
jcenter()
Expand All @@ -64,12 +60,17 @@ allprojects {
}
}

audit {
failOnError = false
}

jdeps {
failOnError = false
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}
}

Expand All @@ -82,9 +83,7 @@ idea {

subprojects { subproj ->
apply plugin: 'java'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'org.kordamp.gradle.stats'
apply from: rootProject.file('gradle/code-coverage.gradle')
apply from: rootProject.file('gradle/code-quality.gradle')

subproj.tasks.withType(JavaCompile) {
Expand All @@ -97,8 +96,6 @@ subprojects { subproj ->
}

if (subproj.publishJars.toBoolean()) {
apply from: rootProject.file('gradle/publishing.gradle')

javadoc {
excludes = ['**/*.html', 'META-INF/**']

Expand All @@ -121,6 +118,7 @@ subprojects { subproj ->
}

task javadocJar(type: Jar) {
dependsOn 'javadoc'
group 'Build'
description 'An archive of the javadoc'
classifier 'javadoc'
Expand All @@ -134,6 +132,8 @@ subprojects { subproj ->
sourcesJar
javadocJar
}

apply from: rootProject.file('gradle/publishing.gradle')
}
}

Expand All @@ -142,16 +142,13 @@ evaluationDependsOnChildren()
if (!project.hasProperty('githubUsername')) ext.githubUsername = ''
if (!project.hasProperty('githubPassword')) ext.githubPassword = ''

githubPages {
gitPublish {
repoUri = project.project_scm
pages {
branch = 'gh-pages'
contents {
from project(':guide').guide.outputs.files
}

credentials {
username = githubUsername
password = githubPassword
}
commitMessage = "Publish guide for $version"
}

publishGhPages.dependsOn(project(':guide').guide)
gitPublishCommit.dependsOn(project(':guide').guide)
12 changes: 6 additions & 6 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
~ limitations under the License.
-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<module name="TreeWalker">
<!-- Blocks -->
<module name="EmptyBlock">
<property name="option" value="stmt"/>
<property name="option" value="text"/>
<property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,INSTANCE_INIT,STATIC_INIT"/>
</module>
<module name="EmptyBlock">
Expand All @@ -41,9 +44,6 @@
<!--<module name="MultipleVariableDeclarations"/>-->
<!--<module name="NoClone"/>-->
<module name="NoFinalizer"/>
<module name="RedundantThrows">
<property name="allowUnchecked" value="true"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version=0.2.2
version=0.3.0
group=org.kordamp.jsilhouette
sourceCompatibility=1.7
targetCompatibility=1.7
sourceCompatibility=1.8
targetCompatibility=1.8
publishJars=false

project_description=Additional shapes for Java applications
project_description=Additional shapes for JavaFX applications
project_url=https://github.com/aalmiray/jsilhouette
project_scm=https://github.com/aalmiray/jsilhouette.git
project_issues=https://github.com/aalmiray/jsilhouette/issues
project_bintray_repo=kordamp
project_bintray_org=aalmiray

javadocFooter=Copyright &copy; 2015-2017 Andres Almiray. All rights reserved.
javadocFooter=Copyright &copy; 2015-2018 Andres Almiray. All rights reserved.
34 changes: 0 additions & 34 deletions gradle/code-coverage.gradle

This file was deleted.

41 changes: 3 additions & 38 deletions gradle/code-quality.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 the original author or authors.
* Copyright 2015-2018 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.
Expand All @@ -14,53 +14,18 @@
* limitations under the License.
*/

apply plugin: 'jdepend'
apply plugin: 'checkstyle'
apply plugin: 'com.github.hierynomus.license'

def configDir = new File(buildscript.sourceFile.parentFile.parentFile, 'config')
ext.checkstyleConfigDir = "$configDir/checkstyle"

checkstyle {
toolVersion = '6.0'
toolVersion = '8.12'
configFile = new File(checkstyleConfigDir, 'checkstyle.xml')
configProperties.checkstyleConfigDir = checkstyleConfigDir
}

if (project.hasProperty('findBugsEnabled') && project.findBugsEnabled.toBoolean()) {
apply plugin: 'findbugs'
findbugs {
toolVersion = '3.0.0'
sourceSets = [sourceSets.main]
ignoreFailures = true
reportsDir = file("$project.buildDir/reports/findbugs")
effort = 'max'
reportLevel = 'high'
}

findbugsMain {
reports {
xml.enabled = false
html.enabled = true
}
}

findbugsTest {
reports {
xml.enabled = false
html.enabled = true
}
}
}


jdepend {
toolVersion = '2.9.1'
sourceSets = [sourceSets.main]
ignoreFailures = true
reportsDir = file("$project.buildDir/reports/jdepend")
}

license {
header = rootProject.file('config/HEADER')
strictCheck = true
Expand All @@ -69,7 +34,7 @@ license {
java = 'SLASHSTAR_STYLE'
fxml = 'XML_STYLE'
}
ext.year = '2015-2017'
ext.year = '2015-2018'
exclude '**/*.ttf'
exclude '**/*.eot'
exclude '**/*.svg'
Expand Down
2 changes: 1 addition & 1 deletion gradle/javafx.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 the original author or authors.
* Copyright 2015-2018 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.
Expand Down
Loading

0 comments on commit 84f4fdc

Please sign in to comment.