Skip to content

Commit

Permalink
Update license headers; update build settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Almiray committed Jan 4, 2020
1 parent 74ecca6 commit 8de4e64
Show file tree
Hide file tree
Showing 34 changed files with 174 additions and 179 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
language: java
jdk: openjdk8
services:
- xvfb
before_install:
- sudo apt update
- sudo apt install openjfx
- chmod +x ./gradlew
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update -qq
- sudo apt-get install oracle-java8-installer
install: true
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.m2/
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.sonar/cache/
before_script:
- ./gradlew --version
script: ./gradlew --scan clean build
jdk:
- oraclejdk8
script: ./gradlew build -S
env: TERM=dumb
12 changes: 6 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
= JSilhouette
:linkattrs:
:project-owner: aalmiray
:project-repo: kordamp
:project-owner: kordamp
:project-repo: maven
: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/travis/{project-owner}/{project-name}/master.svg["Build Status (travis)", link="https://travis-ci.org/{project-owner}/{project-name}"]
image:http://img.shields.io/badge/license-ASL2-blue.svg["ASL2 Licensed", link="http://opensource.org/licenses/ASL2"]
image:https://api.bintray.com/packages/{project-owner}/{project-repo}/{project-name}/images/download.svg[link="https://bintray.com/{project-owner}/{project-repo}/{project-name}/_latestVersion"]
image:https://img.shields.io/maven-central/v/{project-group}/{project-name}-javafx.svg?label=maven[link="https://search.maven.org/#search|ga|1|{project-group}"]
Expand Down Expand Up @@ -54,19 +54,19 @@ dependencies {
</repositories>
----

Refer to the link:http://aalmiray.github.io/jsilhouette/[guide, window="_blank"] for further information on configuration
Refer to the link:http://{project-owner}.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`.
JSilhouette can be used in a modular fashion when running in Java9+. Its module name is `org.kordamp.jsilhouette.javafx`.

== Building

You must meet the following requirements:

* JDK8u60 as a minimum
* Gradle 4.10
* Gradle 5.1

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

Expand Down
74 changes: 20 additions & 54 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2019 Andres Almiray.
* Copyright 2015-2020 Andres Almiray
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,16 +15,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
id 'com.gradle.build-scan' version '2.1'
id 'org.kordamp.gradle.kordamp-parentpom' version '1.2.1'
id 'org.kordamp.gradle.source-xref' version '0.12.0'
}

buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
id 'org.kordamp.gradle.kordamp-parentpom'
}

config {
Expand All @@ -35,49 +27,30 @@ config {
tags = ['javafx', 'shapes']

specification { enabled = false }
}

credentials {
sonatype {
username = project.sonatypeUsername
password = project.sonatypePassword
docs {
sourceHtml {
overview {
stylesheet = project(':guide').file('src/javadoc/resources/css/stylesheet.css')
}
}
}

sourceHtml {
overview {
stylesheet = project(':guide').file('src/javadoc/resources/css/stylesheet.css')
sourceXref {
inputEncoding = 'UTF-8'
}
}

sourceXref {
inputEncoding = 'UTF-8'
}

javadoc {
excludes = ['**/*.html', 'META-INF/**']
options {
links('http://docs.oracle.com/javase/8/docs/api/',
'http://docs.oracle.com/javase/8/javafx/api/')
javadoc {
options {
addBooleanOption('javafx', true)
links('http://docs.oracle.com/javase/8/javafx/api/')
}
}
}
}

allprojects {
apply plugin: 'idea'

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')
}
}
}
}
}

idea {
Expand All @@ -95,11 +68,6 @@ idea {
}

subprojects { subproj ->
subproj.tasks.withType(JavaCompile) {
sourceCompatibility = subproj.sourceCompatibility
targetCompatibility = subproj.targetCompatibility
}

license {
mapping {
fxml = 'XML_STYLE'
Expand All @@ -112,19 +80,19 @@ configurations {
}

dependencies {
asciidoclet 'org.asciidoctor:asciidoclet:1.5.6'
asciidoclet "org.asciidoctor:asciidoclet:$asciidocletVersion"
}

evaluationDependsOn ':image-generator'

task generateImages {
dependsOn project(':image-generator').run
doFirst {
file(aggregateJavadocs.destinationDir).mkdirs()
file(aggregateJavadoc.destinationDir).mkdirs()
}
doLast {
copy {
into file("${aggregateJavadocs.destinationDir}/images")
into file("${aggregateJavadoc.destinationDir}/images")
from project(':image-generator').file('build/images')
}
}
Expand All @@ -133,16 +101,14 @@ task generateImages {
gradle.addBuildListener(new BuildAdapter(){
@Override
void projectsEvaluated(Gradle gradle) {
def createGuideTask = project.tasks.findByName('aggregateJavadocs')

def aggregateJavadocsTask = rootProject.tasks.findByName('aggregateJavadocs')
def aggregateJavadocTask = rootProject.tasks.findByName('aggregateJavadoc')

aggregateJavadocsTask.configure {
aggregateJavadocTask.configure {
dependsOn generateImages
options.docletpath = configurations.asciidoclet.files.asType(List)
options.doclet = 'org.asciidoctor.Asciidoclet'
options.addStringOption "-base-dir", "${projectDir}"
options.addStringOption "-attribute", "imagesdir=${aggregateJavadocsTask.destinationDir}/images"
options.addStringOption "-attribute", "imagesdir=images"
}
}
})
35 changes: 31 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
version = 0.4.0-SNAPSHOT
group = org.kordamp.jsilhouette
sourceCompatibility = 1.8
targetCompatibility = 1.8
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2015-2020 Andres Almiray
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

version = 0.4.0-SNAPSHOT
group = org.kordamp.jsilhouette
sourceCompatibility = 1.8
targetCompatibility = 1.8

asciidocletVersion = 1.5.6
kordampPluginVersion = 0.31.2
kordampPomVersion = 1.10.2
gitPluginVersion = 0.3.2

org.gradle.daemon = true
org.gradle.caching = true
org.gradle.parallel = false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion 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-5.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
51 changes: 31 additions & 20 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 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.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m"'
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down Expand Up @@ -138,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -159,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m"
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
Loading

0 comments on commit 8de4e64

Please sign in to comment.