This repository has been archived by the owner on May 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Florian Lautenschlager
committed
Feb 18, 2016
1 parent
3f8f0cb
commit b1da96e
Showing
37 changed files
with
446,173 additions
and
0 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,194 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
maven { | ||
url "https://plugins.gradle.org/m2/" | ||
} | ||
|
||
} | ||
dependencies { | ||
classpath 'com.gradle.publish:plugin-publish-plugin:0.9.1' | ||
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0' | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' | ||
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0' | ||
} | ||
} | ||
|
||
|
||
plugins { | ||
id "org.sonarqube" version "1.2" | ||
} | ||
|
||
apply plugin: 'org.sonarqube' | ||
|
||
|
||
allprojects { | ||
|
||
apply plugin: 'jacoco' | ||
apply plugin: 'com.github.kt3k.coveralls' | ||
//Some plugins | ||
apply plugin: 'base' | ||
apply plugin: 'groovy' | ||
apply plugin: 'java' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'com.gradle.plugin-publish' | ||
apply plugin: 'com.jfrog.bintray' | ||
apply plugin: 'com.github.hierynomus.license' | ||
|
||
version '0.1' | ||
|
||
group 'de.qaware.chronix' | ||
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
maven { | ||
url "http://dl.bintray.com/chronix/maven" | ||
} | ||
} | ||
|
||
jacoco { | ||
toolVersion = '0.7.2.201409121644' | ||
} | ||
|
||
license { | ||
includes(["**/*.java", "**/*.groovy", "*.gradle"]) | ||
mapping { | ||
java = 'SLASHSTAR_STYLE' | ||
groovy = 'SLASHSTAR_STYLE' | ||
} | ||
} | ||
|
||
|
||
sonarqube { | ||
properties { | ||
property "sonar.sourceEncoding", "UTF-8" | ||
} | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
dependencies { | ||
//Guava | ||
compile 'com.google.guava:guava:18.0' | ||
//Groovy for the win | ||
compile 'org.codehaus.groovy:groovy-all:2.4.5' | ||
compile 'org.apache.commons:commons-lang3:3.4' | ||
|
||
//Logging | ||
compile 'org.slf4j:slf4j-api:1.7.12' | ||
|
||
//Logging framework for tests | ||
testCompile 'org.apache.logging.log4j:log4j-api:2.4' | ||
testCompile 'org.apache.logging.log4j:log4j-core:2.4' | ||
testCompile 'org.apache.logging.log4j:log4j-slf4j-impl:2.4' | ||
|
||
//Testing | ||
testCompile 'junit:junit:4.12' | ||
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0' | ||
testCompile 'cglib:cglib-nodep:3.1' | ||
|
||
} | ||
|
||
test { | ||
reports { | ||
junitXml.enabled = false | ||
html.enabled = true | ||
} | ||
} | ||
|
||
// This disables the pedantic doclint feature of JDK8 | ||
if (JavaVersion.current().isJava8Compatible()) { | ||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
jacocoTestReport { | ||
group = 'Coverage' | ||
description = 'Generate Jacoco coverage report for subproject' | ||
|
||
additionalSourceDirs = project.files(sourceSets.main.allSource.srcDirs) | ||
sourceDirectories = project.files(sourceSets.main.allSource.srcDirs) | ||
classDirectories = project.files(sourceSets.main.output) | ||
|
||
reports { | ||
xml.enabled = true | ||
html.enabled = true | ||
} | ||
|
||
afterEvaluate { | ||
classDirectories = files(classDirectories.files.collect { | ||
fileTree(dir: it, exclude: ['de/qaware/chronix/converter/serializer/gen/**']) | ||
}) | ||
} | ||
} | ||
} | ||
|
||
task jacocoRootReport(type: JacocoReport, group: 'Coverage') { | ||
description = 'Generates aggregate Jacoco coverage report from all subprojects' | ||
dependsOn(subprojects.test) | ||
|
||
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs) | ||
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs) | ||
classDirectories = files(subprojects.sourceSets.main.output) | ||
executionData = files(subprojects.jacocoTestReport.executionData) | ||
|
||
reports { | ||
html.enabled = true | ||
xml.enabled = true | ||
} | ||
|
||
doFirst { | ||
executionData = files(executionData.findAll { it.exists() }) | ||
} | ||
} | ||
|
||
coveralls { | ||
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten() | ||
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml" | ||
} | ||
|
||
def isCI = System.env.'CI' == 'true' | ||
tasks.coveralls { | ||
group = 'Coverage' | ||
description = 'Upload aggregate Jacoco coverage report to Coveralls' | ||
|
||
dependsOn jacocoRootReport | ||
onlyIf { isCI } | ||
} | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '2.10' | ||
} | ||
|
||
|
||
sonarqube { | ||
def sonarUser = project.hasProperty('sonarUser') ? project.sonarUser : 'unknown' | ||
def sonarPw = project.hasProperty('sonarPw') ? project.sonarPw : 'unknown' | ||
|
||
def jdbcUser = project.hasProperty('jdbcUser') ? project.jdbcUser : 'unknown' | ||
def jdbcPw = project.hasProperty('jdbcPw') ? project.jdbcPw : 'unknown' | ||
|
||
properties { | ||
property "sonar.sourceEncoding", "UTF-8" | ||
property "sonar.host.url", "https://www.qaware.de/sonar" | ||
property "sonar.login", "$sonarUser" | ||
property "sonar.password", "$sonarPw" | ||
property "sonar.jdbc.url", "jdbc:mysql://nio-prj-2.intern.qaware.de:3306/sonardb?useUnicode=true&characterEncoding=utf8" | ||
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver" | ||
property "sonar.jdbc.username", "$jdbcUser" | ||
property "sonar.jdbc.password", "$jdbcPw" | ||
property "sonar.projectName", "Chronix-Kassiopeia" | ||
property "sonar.projectKey", "de.qaware.chronix:chronix.kassiopeia" | ||
property "sonar.projectVersion", "$project.version" | ||
property "sonar.exclusions", "src/main/generated/de/qaware/chronix/converter/serializer/gen/*" | ||
} | ||
} |
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 Feb 18 13:56:30 CET 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip |
Oops, something went wrong.