Skip to content

Commit

Permalink
Update project settings
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Sep 27, 2018
1 parent f85b8e9 commit 1890ce2
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 185 deletions.
24 changes: 2 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,11 @@ 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.4'
classpath 'org.ajoberstar:gradle-git:1.7.2'
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.2'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath 'net.nemerosa:versioning:2.7.1'
classpath 'org.kordamp.gradle:jdeps-gradle-plugin:0.3.0'
classpath 'gradle.plugin.net.ossindex:ossindex-gradle-plugin:0.1.1'
}
}

Expand All @@ -49,15 +45,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 @@ -69,14 +64,6 @@ allprojects {
}
}

audit {
failOnError = false
}

jdeps {
failOnError = false
}

dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { selection ->
Expand All @@ -93,9 +80,7 @@ allprojects {

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')
apply from: rootProject.file('gradle/javafx.gradle')

Expand All @@ -104,11 +89,6 @@ subprojects { subproj ->
targetCompatibility = subproj.targetCompatibility
}

subproj.tasks.withType(GroovyCompile) {
sourceCompatibility = subproj.sourceCompatibility
targetCompatibility = subproj.targetCompatibility
}

repositories {
jcenter()
}
Expand Down
59 changes: 32 additions & 27 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
<!--
~ Copyright 2014 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
~
~ 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.
~ Copyright (c) 2015-2018 Andres Almiray
~
~ 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.
-->
<!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 @@ -39,11 +48,8 @@
<module name="EqualsHashCode"/>
<!--<module name="ExplicitInitialization"/>-->
<!--<module name="MultipleVariableDeclarations"/>-->
<module name="NoClone"/>
<!--<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 All @@ -57,19 +63,15 @@
<module name="UnusedImports"/>

<!-- Naming -->
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z]+([A-Z_]*)*$"/>
</module>
<module name="ClassTypeParameterName"/>
<!--<module name="ConstantName"/> -->
<module name="LocalFinalVariableName"/>
<!--<module name="LocalVariableName"/>-->
<module name="MemberName"/>
<module name="MethodName">
<property name="format" value="^(\$)?[a-z]?([a-zA-Z0-9_]*)*$"/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="^[A-Z]+([A-Z_]*)*$"/>
<property name="format" value="^[a-z]+([a-zA-Z0-9_]*)*$"/>
</module>
<module name="MethodTypeParameterName"/>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
</module>
Expand All @@ -78,5 +80,8 @@
<module name="TypeName"/>

</module>
<!--<module name="RegexpHeader">
<property name="headerFile" value="${checkstyleConfigDir}/required-header.txt"/>
</module>-->
<module name="FileTabCharacter"/>
</module>
52 changes: 0 additions & 52 deletions config/codenarc/codenarc.groovy

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.2.4-SNAPSHOT
version=0.2.4
group=org.kordamp.bootstrapfx
sourceCompatibility=1.8
targetCompatibility=1.8
Expand Down
40 changes: 0 additions & 40 deletions gradle/code-coverage.gradle

This file was deleted.

32 changes: 3 additions & 29 deletions gradle/code-quality.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,44 +27,18 @@ 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
}
}
}

license {
header = rootProject.file('config/HEADER')
strictCheck = true
ignoreFailures = true
mapping {
java = 'SLASHSTAR_STYLE'
fxml = 'XML_STYLE'
java = 'SLASHSTAR_STYLE'
fxml = 'XML_STYLE'
}
ext.year = '2015-2018'
exclude '**/*.png'
Expand Down
9 changes: 5 additions & 4 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ apply plugin: 'com.jfrog.bintray'
jar {
manifest {
attributes(
'Built-By': buildBy,
'Created-By': buildCreatedBy,
'Build-Date': buildDate,
'Build-Time': buildTime,
'Build-Revision': buildRevision,
'x-Built-By': buildBy,
'x-Build-Jdk': buildJdk,
'x-Build-Date': buildDate,
'x-Build-Time': buildTime,
'x-Build-Revision': buildRevision,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
Expand Down
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-4.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
20 changes: 11 additions & 9 deletions subprojects/bootstrapfx-core/bootstrapfx-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,12 @@ buildscript {

apply plugin: 'com.github.johnrengelman.processes'
apply plugin: 'com.github.robfletcher.compass'
apply from: rootProject.file('gradle/publishing.gradle')

ext.sassSources = file('src/sass/resources')

task sourcesJar(type: Jar) {
group 'Build'
description 'An archive of the source code'
classifier 'sources'
from sourceSets.main.allSource
}

dependencies {
// upgraded dependencies for compass-gradle
jrubyExec 'org.bouncycastle:bcprov-jdk15on:1.59'
jrubyExec 'org.bouncycastle:bcprov-jdk15on:1.60'
jrubyExec 'org.jruby:jruby-complete:9.2.0.0'
}

Expand All @@ -65,7 +57,15 @@ javadoc {
'http://docs.oracle.com/javase/8/javafx/api/']
}

task sourcesJar(type: Jar) {
group 'Build'
description 'An archive of the source code'
classifier 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar) {
dependsOn 'javadoc'
group 'Build'
description 'An archive of the javadoc'
classifier 'javadoc'
Expand All @@ -80,6 +80,8 @@ artifacts {
javadocJar
}

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

sourceSets {
sass {
resources.srcDir sassSources
Expand Down

0 comments on commit 1890ce2

Please sign in to comment.