Skip to content

Commit

Permalink
Update to latest Griffon
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Jun 1, 2017
1 parent 82dc6be commit 267255e
Show file tree
Hide file tree
Showing 47 changed files with 189 additions and 169 deletions.
85 changes: 43 additions & 42 deletions build.gradle
Expand Up @@ -3,24 +3,28 @@ import java.text.SimpleDateFormat
buildscript {
repositories {
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
mavenLocal()
}

dependencies {
classpath 'org.codehaus.griffon:gradle-griffon-plugin:2.2.0'
classpath 'org.codehaus.griffon:gradle-griffon-build-plugin:2.2.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1'
classpath "org.codehaus.griffon:gradle-griffon-plugin:$griffonVersion"
classpath "org.codehaus.griffon:gradle-griffon-build-plugin:$griffonVersion"
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.1'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'org.ajoberstar:gradle-git:1.0.0'
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.3'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.8'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'org.ajoberstar:gradle-git:1.3.2'
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.14.0'
classpath 'net.nemerosa:versioning:2.6.0'
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.10'
}
}

apply plugin: 'base'
apply plugin: 'idea'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'net.nemerosa.versioning'
apply plugin: 'build-dashboard'
apply from: 'gradle/idea.gradle'
apply plugin: 'org.codehaus.griffon.griffon-build'
Expand All @@ -29,8 +33,11 @@ apply plugin: 'org.ajoberstar.github-pages'

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

allprojects {
Expand All @@ -48,6 +55,19 @@ allprojects {
options.addStringOption('Xdoclint:none', '-quiet')
}
}

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

apply plugin: 'jacoco'
Expand All @@ -59,12 +79,8 @@ jacoco {
ext.jacocoProjects = []

subprojects { subproj ->
subproj.apply plugin: 'net.ltgt.apt'
plugins.withType(JavaPlugin) {
configurations {
compileOnly
testCompileOnly
}

subproj.tasks.withType(JavaCompile) {
sourceCompatibility = subproj.sourceCompatibility
targetCompatibility = subproj.targetCompatibility
Expand All @@ -75,30 +91,13 @@ subprojects { subproj ->
targetCompatibility = subproj.targetCompatibility
}

sourceSets {
main {
compileClasspath += [configurations.compileOnly]
}
test {
compileClasspath += [configurations.testCompileOnly]
}
}

javadoc {
classpath += [configurations.compileOnly]
}

idea {
module {
scopes.PROVIDED.plus += [configurations.compileOnly]
scopes.PROVIDED.plus += [configurations.testCompileOnly]
}
}

dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
testCompile 'org.slf4j:slf4j-simple:1.7.10'
testCompile "junit:junit:$junitVersion"
testCompile "org.codehaus.groovy:groovy-all:$groovyVersion"
testCompile("org.spockframework:spock-core:$spockVersion") {
exclude group: 'org.codehaus.groovy', module:' groovy-all'
}
testCompile "org.slf4j:slf4j-simple:$slf4jVersion"
}

task sourceJar(type: Jar) {
Expand Down Expand Up @@ -147,20 +146,22 @@ githubPages {
publishGhPages.dependsOn(project(":${pluginBaseName}-guide").guide)

coveralls {
sourceDirs = files(jacocoProjects.sourceSets.main.allSource.srcDirs).files.absolutePath
sourceDirs = jacocoProjects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/report.xml"
}

task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
group = 'Reporting'
description = 'Aggregate Jacoco coverage reports.'
dependsOn = jacocoProjects.test
additionalSourceDirs = files(jacocoProjects.sourceSets.main.allSource.srcDirs)
sourceDirectories = files(jacocoProjects.sourceSets.main.allSource.srcDirs)
classDirectories = files(jacocoProjects.sourceSets.main.output)
executionData = files(jacocoProjects.jacocoTestReport.executionData)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
html.destination = "${buildDir}/reports/jacoco/test/html"
xml.destination = "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"
xml.enabled true
html.enabled true
xml.destination "${buildDir}/reports/jacoco/report.xml"
html.destination "${buildDir}/reports/jacoco/html"
}
}
}
40 changes: 23 additions & 17 deletions gradle.properties
@@ -1,17 +1,23 @@
group=org.codehaus.griffon.plugins
version=1.1.0
pluginBaseName=griffon-jdbi
griffonVersion=2.2.0
griffonPlugin=true
publishJars=false
sourceCompatibility=1.7
targetCompatibility=1.7
projectDescription=Griffon Jdbi Plugin
projectInceptionYear=2014
projectWebsiteUrl=http://griffon-plugins.github.io/griffon-jdbi-plugin
projectIssueTrackerUrl=https://github.com/griffon-plugins/griffon-jdbi-plugin/issues
projectVcsUrl=https://github.com/griffon-plugins/griffon-jdbi-plugin
javadocFooter=Copyright © 2014 Andres Almiray. All rights reserved.
projectLabels=griffon,plugin,datasource,jdbi
jacocoVersion=0.7.3.201502191951

group = org.codehaus.griffon.plugins
version = 2.0.0
pluginBaseName = griffon-jdbi
griffonVersion = 2.11.0
griffonPlugin = true
publishJars = false
sourceCompatibility = 1.8
targetCompatibility = 1.8
projectDescription = Griffon JDBI Plugin
projectInceptionYear = 2014
projectWebsiteUrl = http://griffon-plugins.github.io/griffon-jdbi-plugin
projectIssueTrackerUrl = https://github.com/griffon-plugins/griffon-jdbi-plugin/issues
projectVcsUrl = https://github.com/griffon-plugins/griffon-jdbi-plugin
javadocFooter = Copyright © 2014-2017 Andres Almiray. All rights reserved.
projectLabels = griffon,plugin,datasource,jdbi
jacocoVersion = 0.7.9
groovyVersion = 2.4.11
spockVersion = 1.1-groovy-2.4
cglibVersion = 3.2.4
h2Version = 1.4.195
slf4jVersion = 1.7.25
junitVersion = 4.12
jdbiVersion = 2.59
4 changes: 3 additions & 1 deletion gradle/code-quality.gradle
Expand Up @@ -51,8 +51,10 @@ license {
mapping {
java = 'SLASHSTAR_STYLE'
groovy = 'SLASHSTAR_STYLE'
dsld = 'SLASHSTAR_STYLE'
gdsl = 'SLASHSTAR_STYLE'
}
ext.year = '2014-2015'
ext.year = '2014-2017'
exclude '**/*.png'
}

Expand Down
20 changes: 10 additions & 10 deletions gradle/docs.gradle
Expand Up @@ -10,11 +10,11 @@ javadoc {
options.docTitle = "$project.name $project.version API"
options.footer = javadocFooter
options.links = ['http://www.slf4j.org/apidocs/',
'http://junit.org/javadoc/latest/',
'http://docs.oracle.com/javase/7/docs/api/',
'http://jsr-305.googlecode.com/svn/trunk/javadoc/',
'http://atinject.googlecode.com/svn/trunk/javadoc/',
'http://griffon.github.io/griffon/guide/api/',
'http://junit.org/junit4/javadoc/latest/',
'http://docs.oracle.com/javase/8/docs/api/',
'http://aalmiray.github.io/jsr-305/apidocs/',
'http://javax-inject.github.io/javax-inject/api/',
"http://griffon-framework.org/guide/${griffonVersion}/api".toString(),
'http://jdbi.github.io/jdbi-3/apidocs/reference/']

doLast { task ->
Expand All @@ -41,11 +41,11 @@ if (plugins.hasPlugin('groovy')) {
footer = project.javadocFooter
includePrivate = false
link 'http://www.slf4j.org/apidocs/', 'org.slf4j.'
link 'http://docs.oracle.com/javase/7/docs/api/', 'java.', 'org.xml.', 'javax.', 'org.w3c.'
link 'http://jsr-305.googlecode.com/svn/trunk/javadoc/', 'javax.annotation.'
link 'http://griffon.github.io/griffon/guide/api/', 'griffon.', 'org.codehaus.griffon.'
link 'http://junit.org/javadoc/latest/', 'org.junit.', 'junit.'
link 'http://atinject.googlecode.com/svn/trunk/javadoc/', 'javax.inject.'
link 'http://docs.oracle.com/javase/8/docs/api/', 'java.', 'org.xml.', 'javax.', 'org.w3c.'
link 'http://aalmiray.github.io/jsr-305/apidocs/', 'javax.annotation.'
link "http://griffon-framework.org/guide/${griffonVersion}/api".toString(), 'griffon.', 'org.codehaus.griffon.'
link 'http://junit.org/junit4/javadoc/latest/', 'org.junit.', 'junit.'
link 'http://javax-inject.github.io/javax-inject/api/', 'javax.inject.'
link 'http://jdbi.github.io/jdbi-3/apidocs/reference/', 'org.apache.ibatis'

doLast { task ->
Expand Down
4 changes: 2 additions & 2 deletions gradle/idea.gradle
Expand Up @@ -3,8 +3,8 @@ apply plugin: "idea"

idea {
project {
jdkName "1.7"
languageLevel "1.7"
jdkName sourceCompatibility
languageLevel targetCompatibility
ipr {
withXml { provider ->
def node = provider.asNode()
Expand Down
11 changes: 9 additions & 2 deletions gradle/publishing.gradle
Expand Up @@ -32,6 +32,7 @@ publishing {
}
}
asNode().children().last() + pomConfig
asNode().appendNode('description', project.projectDescription)
}
}
}
Expand All @@ -40,10 +41,11 @@ publishing {
jar {
manifest {
attributes(
'Built-By': System.properties['user.name'],
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(),
'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': 'griffon-framework.org',
Expand All @@ -52,6 +54,11 @@ jar {
'Implementation-Vendor': 'griffon-framework.org'
)
}

metaInf {
from rootProject.file('.')
include 'LICENSE'
}
}

if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = ''
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Feb 16 21:41:25 CET 2015
#Fri May 26 14:03:48 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip

0 comments on commit 267255e

Please sign in to comment.