Skip to content

Commit

Permalink
Several updates to the build setup
Browse files Browse the repository at this point in the history
 - apply license plugin. format all files with proper license headers.
 - append LICENSE file to JAR.
 - append extra JAR manifest properties.
 - update build dependencies.
  • Loading branch information
aalmiray committed Oct 28, 2016
1 parent 1c77b3f commit ebb7ef8
Show file tree
Hide file tree
Showing 22 changed files with 518 additions and 22 deletions.
76 changes: 54 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,55 @@
apply plugin: "java"
apply plugin: "maven"
apply plugin: "signing"
apply plugin: 'sonar-runner'
apply plugin: "jacoco"
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

sourceCompatibility = 1.8
targetCompatibility = 1.8
import java.text.SimpleDateFormat

group = "eu.lestard"
version = "0.5.0"
plugins {
id 'java'
id 'maven'
id 'signing'
id 'sonar-runner'
id 'jacoco'
id 'idea'
id 'net.nemerosa.versioning' version '2.5.0'
id 'com.github.ben-manes.versions' version '0.13.0'
id 'com.github.hierynomus.license' version '0.11.0'
}

Date buildTimeAndDate = new Date()
ext {
buildBy = System.properties['user.name']
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()
}

apply from: "maven_upload.gradle"
apply from: file('gradle/maven_upload.gradle')
apply from: file('gradle/publishing.gradle')
apply from: file('gradle/code-quality.gradle')

repositories {
mavenLocal()
mavenCentral()
jcenter()
maven{
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
Expand All @@ -24,33 +59,30 @@ configurations {
markdownDoclet
}


dependencies {

markdownDoclet 'ch.raffael.pegdown-doclet:pegdown-doclet:1.1.1'
markdownDoclet 'ch.raffael.pegdown-doclet:pegdown-doclet:1.3'

// testing
testCompile "eu.lestard:assertj-javafx:0.3.0"
testCompile "org.assertj:assertj-core:1.6.0"
testCompile "junit:junit:4.11"
testCompile 'eu.lestard:assertj-javafx:0.3.0'
testCompile 'org.assertj:assertj-core:3.5.2'
testCompile 'junit:junit:4.12'
}


jacoco {
toolVersion = "0.7.0.201403182114"
toolVersion = jacocoVersion
}

javadoc.options{
links "http://docs.oracle.com/javase/8/docs/api/", "http://docs.oracle.com/javase/8/javafx/api"

docletpath = configurations.markdownDoclet.files.asType(List)
doclet = "ch.raffael.doclets.pegdown.PegdownDoclet"
addStringOption("parse-timeout", "10")
doclet = 'ch.raffael.doclets.pegdown.PegdownDoclet'
addStringOption('parse-timeout', '10')
}

sonarRunner {
sonarProperties {
properties["sonar.libraries"] += System.env.'JAVA_HOME' + "/jre/lib/ext/jfxrt.jar"
properties['sonar.libraries'] += System.env.'JAVA_HOME' + '/jre/lib/ext/jfxrt.jar'
property 'sonar.jacoco.reportPath', "${buildDir}/jacoco/test.exec"
property 'sonar.junit.reportsPath', "${buildDir}/test-results"
}
Expand Down
7 changes: 7 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
group = eu.lestard
version = 0.6.0-SNAPSHOT
sourceCompatibility = 1.8
targetCompatibility = 1.8
jacocoVersion = 0.7.7.201606060606

project_name=advanced-bindings
project_description=Library of JavaFX Custom Bindings
project_url=https://github.com/lestard/advanced-bindings
project_vendor=Advanced Bindings

project_scm=scm:git@github.com:lestard/advanced-bindings.git

Expand Down
19 changes: 19 additions & 0 deletions gradle/HEADER
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) ${year} ${author}

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
36 changes: 36 additions & 0 deletions gradle/code-quality.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

license {
header = rootProject.file('gradle/HEADER')
strictCheck = true
ignoreFailures = true
mapping {
java = 'SLASHSTAR_STYLE'
}
ext.year = '2014-2016'
ext.author = 'Manuel Mauky'
}

licenseTest {
source -= sourceSets.test.resources
}
22 changes: 22 additions & 0 deletions maven_upload.gradle → gradle/maven_upload.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

/*
* gradle script to upload archives to maven central and Sonatype OSS
*
Expand Down
44 changes: 44 additions & 0 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

jar {
manifest {
attributes(
'Built-By': buildBy,
'Created-By': buildCreatedBy,
'Build-Date': buildDate,
'Build-Time': buildTime,
'Build-Revision': buildRevision,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Specification-Vendor': project.project_vendor,
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': project.project_vendor
)
}
metaInf {
from(rootProject.files('.')) {
include 'LICENSE*'
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package eu.lestard.advanced_bindings.api;

import javafx.beans.Observable;
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/eu/lestard/advanced_bindings/api/LogicBindings.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package eu.lestard.advanced_bindings.api;

import javafx.beans.binding.Bindings;
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/eu/lestard/advanced_bindings/api/MathBindings.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package eu.lestard.advanced_bindings.api;

import javafx.beans.binding.DoubleBinding;
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/eu/lestard/advanced_bindings/api/NumberBindings.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package eu.lestard.advanced_bindings.api;

import javafx.beans.binding.*;
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/eu/lestard/advanced_bindings/api/ObjectBindings.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2014-2016 Manuel Mauky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package eu.lestard.advanced_bindings.api;

import javafx.beans.binding.Bindings;
Expand Down
Loading

0 comments on commit ebb7ef8

Please sign in to comment.