-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Includes the following changes - gradle wrapper - license configuration - code coverage (jaCoCo) - coveralls support - Travis-ci support - running the application using Jetty
- Loading branch information
Showing
11 changed files
with
495 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,8 @@ | |
.settings/ | ||
.idea/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
/build/ | ||
.gradle/ | ||
deploy*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
language: java | ||
|
||
install: | ||
- TERM=dumb ./gradlew -q assemble | ||
|
||
script: | ||
- TERM=dumb ./gradlew build jacocoTestReport jacocoRootReport | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
notifications: | ||
email: | ||
recipients: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- oraclejdk8 | ||
|
||
after_success: | ||
./gradlew coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
plugins { | ||
id 'java' | ||
id 'idea' | ||
id 'jacoco' | ||
id 'org.akhikhl.gretty' version '1.1.8' | ||
id 'com.github.kt3k.coveralls' version '2.1.0' | ||
id 'com.github.ben-manes.versions' version '0.7' | ||
id 'com.github.hierynomus.license' version '0.11.0' | ||
} | ||
|
||
idea { | ||
project { | ||
jdkName sourceCompatibility | ||
languageLevel sourceCompatibility | ||
} | ||
} | ||
|
||
def profile = project.hasProperty('profile') ? project.profile : 'dev' | ||
|
||
ext { | ||
// default settings | ||
jettyPort = 8080 | ||
jettyHost = '0.0.0.0' | ||
datasourceDialect = 'HSQLDB' | ||
datasourceDriver = 'org.hsqldb.jdbcDriver' | ||
datasourceUrl = 'jdbc:hsqldb:mem:alfio' | ||
datasourceUsername = 'sa' | ||
datasourcePassword = '' | ||
datasourceValidationQuery = 'SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS' | ||
springProfilesActive = 'dev' | ||
|
||
switch (profile) { | ||
case 'dev-pgsql': | ||
datasourceDialect = 'PGSQL' | ||
datasourceDriver = 'org.postgresql.Driver' | ||
datasourceUrl = 'jdbc:postgresql://localhost:5432/alfio' | ||
datasourceUsername = 'postgres' | ||
datasourcePassword = 'password' | ||
datasourceValidationQuery = 'SELECT 1' | ||
break | ||
case 'docker-test': | ||
datasourceDialect = 'PGSQL' | ||
datasourceDriver = 'org.postgresql.Driver' | ||
datasourceUrl = 'jdbc:postgresql://0.0.0.0:5432/postgres' | ||
datasourceUsername = 'postgres' | ||
datasourcePassword = 'postgres' | ||
datasourceValidationQuery = 'SELECT 1' | ||
} | ||
} | ||
|
||
configurations { | ||
compileOnly | ||
testCompileOnly | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
compile "org.springframework:spring-webmvc:$springVersion" | ||
compile "org.springframework:spring-context-support:$springVersion" | ||
compile "org.springframework:spring-jdbc:$springVersion" | ||
compile "org.springframework:spring-aop:$springVersion" | ||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion" | ||
compile "com.fasterxml.jackson.core:jackson-core:$jacksonVersion" | ||
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion" | ||
compile "org.springframework.security:spring-security-web:$springSecurityConfigVersion" | ||
compile "org.springframework.security:spring-security-config:$springSecurityConfigVersion" | ||
compile "com.samskivert:jmustache:1.9" | ||
compile "com.github.sps.mustache:mustache-spring-view:1.3" | ||
compile "javax.mail:mail:1.4.6" | ||
compile("org.xhtmlrenderer:flying-saucer-pdf:9.0.7") { | ||
exclude(module: 'bcmail-jdk14') | ||
exclude(module: 'bcprov-jdk14') | ||
exclude(module: 'bctsp-jdk14') | ||
} | ||
compile "com.google.zxing:core:3.1.0" | ||
compile "com.google.zxing:javase:3.1.0" | ||
compile "org.flywaydb:flyway-core:3.1" | ||
compile "org.postgresql:postgresql:9.3-1102-jdbc41" | ||
compile "org.apache.tomcat:tomcat-jdbc:8.0.8" | ||
compile "org.apache.logging.log4j:log4j-api:$log4jVersion" | ||
compile "org.apache.logging.log4j:log4j-core:$log4jVersion" | ||
compile "org.apache.logging.log4j:log4j-jcl:$log4jVersion" | ||
compile "com.stripe:stripe-java:$stripeVersion" | ||
compile "com.google.maps:google-maps-services:0.1.4" | ||
compile "org.apache.commons:commons-lang3:3.3.2" | ||
compile "com.squareup.okhttp:okhttp:2.2.0" | ||
|
||
testCompile "org.springframework:spring-test:$springVersion" | ||
testCompile "com.insightfullogic:lambda-behave:0.3" | ||
|
||
compileOnly "org.projectlombok:lombok:1.14.8" | ||
compileOnly "javax.servlet:javax.servlet-api:3.1.0" | ||
testCompile "javax.servlet:javax.servlet-api:3.1.0" | ||
runtime "org.hsqldb:hsqldb:$hsqldbVersion" | ||
} | ||
|
||
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] | ||
} | ||
} | ||
|
||
// -- license configuration | ||
|
||
license { | ||
header = rootProject.file('config/HEADER') | ||
strictCheck = true | ||
ignoreFailures = true | ||
mapping { | ||
java = 'JAVADOC_STYLE' | ||
sql = 'DOUBLEDASHES_STYLE' | ||
} | ||
ext.year = '2014-2015' | ||
include '**/*.java' | ||
include '**/*.sql' | ||
} | ||
|
||
// -- jetty | ||
|
||
gretty { | ||
port = project.jettyPort | ||
jvmArgs = [ | ||
"-Dspring.profiles.active=${project.springProfilesActive}", | ||
"-Ddatasource.dialect=${project.datasourceDialect}", | ||
"-Ddatasource.driver=${project.datasourceDriver}", | ||
"-Ddatasource.url=${project.datasourceUrl}", | ||
"-Ddatasource.username=${project.datasourceUsername}", | ||
"-Ddatasource.password=${project.datasourcePassword}", | ||
"-Ddatasource.validationQuery=${project.datasourceValidationQuery}" | ||
] | ||
} | ||
|
||
// -- code-coverage | ||
|
||
jacoco { | ||
toolVersion = '0.7.2.201409121644' | ||
} | ||
|
||
jacocoTestReport { | ||
group = 'Reporting' | ||
description = 'Generate Jacoco coverage reports after running tests.' | ||
additionalSourceDirs = project.files(sourceSets.main.allSource.srcDirs) | ||
sourceDirectories = project.files(sourceSets.main.allSource.srcDirs) | ||
classDirectories = project.files(sourceSets.main.output) | ||
reports { | ||
xml.enabled = true | ||
csv.enabled = false | ||
html.enabled = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
This file is part of alf.io. | ||
|
||
alf.io is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
alf.io is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with alf.io. If not, see <http://www.gnu.org/licenses/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
group=alfio | ||
version=1.3-SNAPSHOT | ||
|
||
sourceCompatibility=1.8 | ||
targetCompatibility=1.8 | ||
|
||
springVersion=4.1.4.RELEASE | ||
jettyVersion=9.2.2.v20140723 | ||
springSecurityConfigVersion=3.2.5.RELEASE | ||
log4jVersion=2.1 | ||
jacksonVersion=2.4.4 | ||
stripeVersion=1.19.1 | ||
hsqldbVersion=2.3.2 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Thu Jan 29 19:12:18 CET 2015 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-bin.zip |
Oops, something went wrong.