1+ // {{start:build}}
12buildscript {
23 repositories {
34 jcenter()
45 }
6+ // buildscript dependencies can be used for build time plugins.
57 dependencies {
68 classpath " com.github.jengelman.gradle.plugins:shadow:1.2.3"
79 }
810}
911
10- def jacksonV = ' 2.8.5'
11- def okhttpV = ' 3.4.1'
12- def slf4jV = ' 1.7.21'
13- def logbackV = ' 1.1.8'
14- def undertowV = ' 1.4.8.Final'
15- def metricsV = ' 3.1.2'
16- def guavaV = ' 19.0'
17- def typesafeConfigV = ' 1.3.1'
18- def handlebarsV = ' 4.0.5'
19- def htmlcompressorV = ' 1.4'
20- def hikariCpV = ' 2.6.0'
21- def hsqldbV = ' 2.3.4'
22- def joolV = ' 0.9.12'
23-
24- // Test
25- def junitV = ' 4.12'
26-
27- ext {
28- jacksonLib = [
29- [group : ' com.fasterxml.jackson.core' , name : ' jackson-core' , version : jacksonV]
30- , [group : ' com.fasterxml.jackson.core' , name : ' jackson-databind' , version : jacksonV]
31- , [group : ' com.fasterxml.jackson.core' , name : ' jackson-annotations' , version : jacksonV]
32- , [group : ' com.fasterxml.jackson.datatype' , name : ' jackson-datatype-jdk8' , version : jacksonV]
33- , [group : ' com.fasterxml.jackson.datatype' , name : ' jackson-datatype-jsr310' , version : jacksonV]
34- ]
35- metricsLib = [
36- [group : ' io.dropwizard.metrics' , name : ' metrics-core' , version : metricsV]
37- , [group : ' io.dropwizard.metrics' , name : ' metrics-jvm' , version : metricsV]
38- , [group : ' io.dropwizard.metrics' , name : ' metrics-json' , version : metricsV]
39- , [group : ' io.dropwizard.metrics' , name : ' metrics-logback' , version : metricsV]
40- , [group : ' io.dropwizard.metrics' , name : ' metrics-healthchecks' , version : metricsV]
41- ]
42- undertowLib = [[group : ' io.undertow' , name : ' undertow-core' , version : undertowV]]
43- loggingLib = [
44- [group : ' org.slf4j' , name : ' slf4j-api' , version : slf4jV]
45- , [group : ' ch.qos.logback' , name : ' logback-classic' , version : logbackV]
46-
47- ]
48- guavaLib = [[group : ' com.google.guava' , name : ' guava' , version : guavaV]]
49- typesafeConfigLib = [[group : ' com.typesafe' , name : ' config' , version : typesafeConfigV]]
50- handlebarsLib = [
51- [group : ' com.github.jknack' , name : ' handlebars' , version : handlebarsV]
52- , [group : ' com.github.jknack' , name : ' handlebars-jackson2' , version : handlebarsV]
53- , [group : ' com.googlecode.htmlcompressor' , name : ' htmlcompressor' , version : htmlcompressorV]
54- ]
55- hikariCpLib = [[group : ' com.zaxxer' , name : ' HikariCP' , version : hikariCpV]]
56- junitLib = [[group : ' junit' , name : ' junit' , version : junitV]]
57- hsqldbLib = [[group : ' org.hsqldb' , name : ' hsqldb' , version : hsqldbV]]
58- joolLib = [[group : ' org.jooq' , name : ' jool' , version : joolV]]
59- }
12+ // Include a gradle script that has all of our dependencies split out.
13+ apply from : " gradle/dependencies.gradle"
6014
6115allprojects {
6216 // Apply the java plugin to add support for Java
@@ -67,26 +21,22 @@ allprojects {
6721
6822 // Using Jitpack so I need the repo name in the group to match.
6923 group = ' com.stubbornjava.StubbornJava'
70- version = ' 0.1.1 -SNAPSHOT'
24+ version = ' 0.1.2 -SNAPSHOT'
7125
7226 repositories {
7327 mavenLocal()
7428 mavenCentral()
75- maven { url ' https://jitpack.io' }
29+ maven { url ' https://jitpack.io' } // This allows us to use jitpack projects
7630 }
7731
7832 configurations. all {
7933 resolutionStrategy {
8034 // fail eagerly on version conflict (includes transitive dependencies)
8135 // e.g. multiple different versions of the same dependency (group and name are equal)
82- // Turn this on eventually
8336 failOnVersionConflict()
8437
85- // prefer modules that are part of this build (multi-project or composite build) over external modules
86- // preferProjectModules()
87-
8838 // Auto force all of our explicit dependencies.
89- this . ext . properties . findAll { k , v -> k . endsWith( ' Lib ' ) } . each { k , v -> force(v) }
39+ libs . each { k , v -> force(v) }
9040
9141 // cache dynamic versions for 10 minutes
9242 cacheDynamicVersionsFor 10 * 60 , ' seconds'
@@ -100,6 +50,7 @@ allprojects {
10050 from sourceSets. main. allJava
10151 }
10252
53+ // This publishes sources with our jars.
10354 publishing {
10455 publications {
10556 mavenJava(MavenPublication ) {
@@ -120,3 +71,4 @@ subprojects {
12071 classifier = null
12172 }
12273}
74+ // {{end:build}}
0 commit comments