1+ import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorExtension
2+
13plugins {
2- id(' com.github.ben-manes.versions' )
3- id(' com.github.johnrengelman.shadow' )
4- id(' com.adarshr.test-logger' ) version ' 2.1.1'
5- id(' com.diffplug.spotless' ) version ' 5.9.0'
6- id(' com.gorylenko.gradle-git-properties' ) version ' 2.2.4'
7- id(' io.franzbecker.gradle-lombok' ) version ' 4.0.0'
8- id(' info.solidsoft.pitest' ) version ' 1.5.2'
9-
10- id(' jacoco' )
11- id(' org.sonarqube' )
12- id(' java' )
13- id(' maven' )
14- id(' checkstyle' )
15- id(' java-gradle-plugin' )
4+ id(" com.github.ben-manes.versions" )
5+ id(" com.github.johnrengelman.shadow" )
6+ id(" com.adarshr.test-logger" ) version " 2.1.1"
7+ id(" com.diffplug.spotless" ) version " 5.9.0"
8+ // id(" com.gorylenko.gradle-git-properties" ) version " 2.2.4"
9+ id(" io.franzbecker.gradle-lombok" ) version " 4.0.0"
10+ id(" info.solidsoft.pitest" ) version " 1.5.2"
11+
12+ id(" jacoco" )
13+ id(" org.sonarqube" )
14+ id(" java" )
15+ id(" maven" )
16+ id(" checkstyle" )
17+ id(" java-gradle-plugin" )
1618}
1719
1820repositories {
@@ -22,69 +24,70 @@ repositories {
2224 jcenter()
2325
2426 maven {
25- name ' Artifactory repository'
26- url ' https://oss.jfrog.org/artifactory/oss-snapshot-local/'
27+ name " Artifactory repository"
28+ url " https://oss.jfrog.org/artifactory/oss-snapshot-local/"
2729 }
2830 maven {
29- name ' Jitpack repository'
30- url ' https://jitpack.io'
31+ name " Jitpack repository"
32+ url " https://jitpack.io"
3133 }
3234 maven {
33- name ' JCenter gradle plugins repository'
34- url ' https://dl.bintray.com/gradle/gradle-plugins'
35+ name " JCenter gradle plugins repository"
36+ url " https://dl.bintray.com/gradle/gradle-plugins"
3537 }
3638 maven {
37- name ' Sonatype snapshots repository'
38- url ' https://oss.sonatype.org/content/repositories/snapshots/'
39+ name " Sonatype snapshots repository"
40+ url " https://oss.sonatype.org/content/repositories/snapshots/"
3941 }
4042 maven {
41- name ' Gradle plugins repository'
42- url ' https://plugins.gradle.org/m2/'
43+ name " Gradle plugins repository"
44+ url " https://plugins.gradle.org/m2/"
4345 }
4446 maven {
45- name ' IceRockDev gradle plugins repository'
46- url ' https://dl.bintray.com/icerockdev/plugins'
47+ name " IceRockDev gradle plugins repository"
48+ url " https://dl.bintray.com/icerockdev/plugins"
4749 }
4850}
4951
5052allprojects {
51- apply plugin : ' info.solidsoft.pitest'
52- apply plugin : ' io.github.robwin.jgitflow'
53- apply plugin : ' com.github.kt3k.coveralls'
54- apply plugin : ' com.github.johnrengelman.shadow'
55- apply plugin : ' com.adarshr.test-logger'
56- apply plugin : ' com.diffplug.spotless'
57- apply plugin : ' java'
58- apply plugin : ' jacoco'
53+ apply plugin : " com.vanniktech.dependency.graph.generator"
54+ apply plugin : " info.solidsoft.pitest"
55+ apply plugin : " io.github.robwin.jgitflow"
56+ // apply plugin: "com.github.kt3k.coveralls"
57+ apply plugin : " com.github.johnrengelman.shadow"
58+ apply plugin : " com.adarshr.test-logger"
59+ apply plugin : " com.diffplug.spotless"
60+ apply plugin : " java"
61+ apply plugin : " jacoco"
5962
6063 repositories {
6164 jcenter()
6265 mavenCentral()
6366
6467 maven {
65- name ' KotlinX repository'
66- url ' https://kotlin.bintray.com/kotlinx'
68+ name " KotlinX repository"
69+ url " https://kotlin.bintray.com/kotlinx"
6770 }
6871 maven {
69- name ' Artifactory repository'
70- url ' https://oss.jfrog.org/artifactory/oss-snapshot-local/'
72+ name " Artifactory repository"
73+ url " https://oss.jfrog.org/artifactory/oss-snapshot-local/"
7174 }
7275 }
7376
7477 pitest {
7578 threads. set(4 )
76- outputFormats. set([' XML' , ' HTML' ])
79+ outputFormats. set([" XML" , " HTML" ])
7780 timestampedReports. set(false )
7881
79- junit5PluginVersion. set(' 0.12' )
82+ junit5PluginVersion. set(" 0.12" )
8083
8184 testSourceSets. set([sourceSets. test]) // sourceSets.integrationTest
8285 mainSourceSets. set([sourceSets. main]) // sourceSets.additionalMain
83- jvmArgs. set([' -Xmx1024m' , ' -Dspring.test.constructor.autowire.mode=all' ])
86+ jvmArgs. set([" -Xmx1024m" , " -Dspring.test.constructor.autowire.mode=all" ])
8487 useClasspathFile. set(true ) // useful with bigger projects on Windows
85- fileExtensionsToFilter. addAll(' xml' , ' orbit' )
88+ fileExtensionsToFilter. addAll(" xml" , " orbit" )
8689
87- if (project. name in [' appflow' , ' avro' , ' codecheck' , ' db-schema' , ' flatbuffers' , ' protobuf' , ' thrift' , ' testflow' ]) {
90+ if (project. name in [" appflow" , " avro" , " codecheck" , " db-schema" , " flatbuffers" , " protobuf" , " thrift" , " testflow" ]) {
8891 failWhenNoMutations. set(false )
8992 }
9093 }
@@ -97,47 +100,51 @@ allprojects {
97100 }
98101 }
99102
100- gitProperties {
101- failOnNoGitDirectory = false
102- dateFormat = " yyyy-MM-dd'T'HH:mmZ"
103- dateFormatTimeZone = ' PST'
104- }
103+ // gitProperties {
104+ // failOnNoGitDirectory = false
105+ // dateFormat = "yyyy-MM-dd'T'HH:mmZ"
106+ // dateFormatTimeZone = " PST"
107+ // }
105108
106109 def buildProperties = new Properties ()
107- file(rootDir. absolutePath + ' /build.properties' ). withInputStream { buildProperties. load(it) }
108- if (buildProperties. getProperty(' build.debug' ). toBoolean()) {
110+ file(rootDir. absolutePath + " /build.properties" ). withInputStream { buildProperties. load(it) }
111+ if (buildProperties. getProperty(" build.debug" ). toBoolean()) {
109112
110- coveralls {
111- jacocoReportPath ' build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml '
113+ dependencyGraphGenerator {
114+ generators = [ DependencyGraphGeneratorExtension.Generator . ALL ]
112115 }
113116
117+ // coveralls {
118+ // jacocoReportPath "build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
119+ // }
120+
114121 initJGitflow {
115122 feature = " features/"
116123 release = " releases/"
117- versiontag = ' v '
124+ versiontag = " v "
118125 }
119126
120127 testlogger {
121- theme ' mocha'
128+ theme " mocha"
122129 slowThreshold 5000
123130 }
124131
125132 spotless {
126- format ' misc' , {
127- target ' **/*.gradle' , ' **/*.md' , ' **/.gitignore'
128- targetExclude ' docs/**'
133+ format " misc" , {
134+ target " **/*.gradle" , " **/*.md" , " **/.gitignore"
135+ targetExclude " docs/**"
129136
130137 trimTrailingWhitespace()
131138 indentWithSpaces()
132139 endWithNewline()
133140 }
134141 java {
135- target ' build/**/*.java'
136- targetExclude ' **/avro/*.java' , ' flatbuffers/**/*.java' , ' thrift/**/*.java' , ' **/protobuf/*.java'
142+ target " build/**/*.java"
143+ targetExclude " **/avro/*.java" , " flatbuffers/**/*.java" , " thrift/**/*.java" , " **/protobuf/*.java"
137144 googleJavaFormat(). aosp()
138145 }
139146 kotlin {
140- target ' **/*.kt'
147+ target " **/*.kt"
141148 ktlint()
142149 trimTrailingWhitespace()
143150 endWithNewline()
@@ -147,12 +154,12 @@ allprojects {
147154}
148155
149156subprojects {
150- apply from : rootProject. file(' buildSrc/src/main/groovy/setup.gradle' )
151- apply from : rootProject. file(' buildSrc/src/main/groovy/dependencies.gradle' )
152- apply from : rootProject. file(' buildSrc/src/main/groovy/subproject.gradle' )
157+ apply from : rootProject. file(" buildSrc/src/main/groovy/setup.gradle" )
158+ apply from : rootProject. file(" buildSrc/src/main/groovy/dependencies.gradle" )
159+ apply from : rootProject. file(" buildSrc/src/main/groovy/subproject.gradle" )
153160
154- apply plugin : ' java'
155- apply plugin : ' groovy'
161+ apply plugin : " java"
162+ apply plugin : " groovy"
156163
157164 group projectConfig. group
158165 version projectConfig. version
@@ -171,7 +178,7 @@ subprojects {
171178 }
172179
173180 dependencies {
174- implementation fileTree(dir : ' libs' , include : [' *.jar' ])
181+ implementation fileTree(dir : " libs" , include : [" *.jar" ])
175182
176183 // guava library dependencies
177184 implementation libraries. core. guava
@@ -214,44 +221,52 @@ subprojects {
214221 dependencyUpdates. resolutionStrategy {
215222 componentSelection { rules ->
216223 rules. all { ComponentSelection selection ->
217- boolean rejected = [' alpha' , ' beta' , ' rc ' , ' cr ' , ' m ' , ' preview' , ' b ' , ' ea ' , ' snapshot' ]. any {
224+ boolean rejected = [" alpha" , " beta" , " rc " , " cr " , " m " , " preview" , " b " , " ea " , " snapshot" ]. any {
218225 qualifier ->
219226 selection. candidate. version ==~ / (?i).*[.-]${qualifier}[.\d -+]*/
220227 }
221228 if (rejected) {
222- selection. reject(' Release candidate' )
229+ selection. reject(" Release candidate" )
223230 }
224231 }
225232 }
226233 }
227234
228235 jar {
229236 from { configurations. compile. collect { it. isDirectory() ? it : zipTree(it) } }
230- // from { configurations.runtimeClasspath.get().filter { it.name.endsWith(' jar' ) }.map { zipTree(it) } }
237+ // from { configurations.runtimeClasspath.get().filter { it.name.endsWith(" jar" ) }.map { zipTree(it) } }
231238
232239 manifest {
233- attributes(' Automatic-Module-Name' : projectConfig. module)
234- attributes(' Build-Date' : Instant . now(). toString())
235- attributes(' Class-Path' : configurations. compile. collect { it. getPath() }. join(' ' ))
240+ attributes(" Automatic-Module-Name" : projectConfig. module)
241+ attributes(" Built-By" : " Robert Winkler" )
242+ attributes(" Build-Date" : Instant . now(). toString())
243+ attributes(" Build-Date" : project. buildDate)
244+ attributes(" Build-Time" : project. buildTime)
245+ attributes(" Specification-Title" : projectConfig. module)
246+ attributes(" Specification-Version" : project. version)
247+ attributes(" Implementation-Title" : projectConfig. module)
248+ attributes(" Implementation-Version" : project. version)
249+ attributes(" Created-By" : projectConfig. vendor)
250+ attributes(" Class-Path" : configurations. compile. collect { it. getPath() }. join(" " ))
236251 }
237252 }
238253}
239254
240- task stage (dependsOn : [' clean' ])
255+ task stage (dependsOn : [" clean" ])
241256
242257task copyToLib (type : Copy ) {
243- from ' $buildDir/libs'
244- into ' $rootProject.buildDir/libs'
258+ from " $buildDir /libs"
259+ into " $rootProject . buildDir /libs"
245260}
246261copyToLib. dependsOn(stage)
247262stage. dependsOn(copyToLib)
248263
249264task copyLicense {
250- outputs. file new File (' $buildDir/LICENSE' )
265+ outputs. file new File (" $buildDir /LICENSE" )
251266 doLast {
252267 copy {
253- from ' LICENSE'
254- into ' $buildDir'
268+ from " LICENSE"
269+ into " $buildDir "
255270 }
256271 }
257272}
0 commit comments