Skip to content

Commit 8e4d63e

Browse files
committed
updates to latest gradle and project plugin
introduces cats-test library with shared test code instead of building and consuming test jars out of cats core and cats redis
1 parent a3de07d commit 8e4d63e

30 files changed

+26
-185
lines changed

build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ buildscript {
2727
maven { url "http://dl.bintray.com/spinnaker/gradle" }
2828
}
2929
dependencies {
30-
classpath 'com.netflix.spinnaker:spinnaker-gradle-project:1.12.115'
30+
classpath 'com.netflix.spinnaker.gradle:spinnaker-gradle-project:2.2.0'
3131
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
3232
}
3333
}
3434

3535
allprojects {
3636
group = "com.netflix.spinnaker.clouddriver"
37-
apply plugin: 'spinnaker-gradle-project'
37+
apply plugin: 'spinnaker.project'
3838
apply plugin: 'idea'
3939
}
4040

@@ -44,13 +44,14 @@ subprojects { project ->
4444
targetCompatibility = 1.8
4545
sourceCompatibility = 1.8
4646

47-
47+
/*
4848
repositories {
4949
maven { url 'http://oss.jfrog.org/repo' }
5050
jcenter()
5151
maven { url 'http://dl.bintray.com/spinnaker/spinnaker' }
5252
maven { url 'http://repo.spring.io/repo' }
5353
}
54+
*/
5455

5556
configurations {
5657
all {
@@ -88,5 +89,4 @@ subprojects { project ->
8889
}
8990
}
9091

91-
tasks.checkSnapshotDependencies.enabled = false
9292
defaultTasks ':clouddriver-web:bootRun'

cats/cats-core/cats-core.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
dependencies {
22
compile spinnaker.dependency("frigga")
3-
}
3+
4+
testCompile project(":cats:cats-test")
5+
}

cats/cats-redis/cats-redis.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ dependencies {
22
compile project(':cats:cats-core')
33
compile 'redis.clients:jedis:2.6.2'
44
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.3'
5-
testCompile project(path: ':cats:cats-core', configuration: 'test')
5+
testCompile project(':cats:cats-test')
66
}

cats/cats-test/cats-test.gradle

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
tasks.compileGroovy.enabled = true
2+
3+
dependencies {
4+
compile project(":cats:cats-core")
5+
compile spinnaker.dependency('groovy')
6+
compile spinnaker.dependency('spock')
7+
}

cats/cats.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
subprojects {
22
apply plugin: 'findbugs'
33
apply plugin: 'pmd'
4-
apply plugin: 'nebula-test-jar'
54

65
dependencies {
7-
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
6+
testCompile 'org.spockframework:spock-core:1.0-groovy-2.3'
87
testCompile 'cglib:cglib-nodep:3.1'
98
testCompile 'org.objenesis:objenesis:2.1'
109
pmd 'net.sourceforge.pmd:pmd:5.1.3'

clouddriver-cf/clouddriver-cf.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
dependencies {
22
compile project(":clouddriver-core")
3-
spinnaker.group('cf')
43
compile spinnaker.dependency('frigga')
54
compile spinnaker.dependency('bootActuator')
65
compile spinnaker.dependency('bootWeb')

clouddriver-security/clouddriver-security.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ dependencies {
77

88
testCompile project(':clouddriver-aws')
99
testCompile project(':clouddriver-google')
10-
testCompile project(path: ':cats:cats-core', configuration: 'test')
10+
testCompile project(':cats:cats-test')
1111
}

clouddriver-web/clouddriver-web.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apply plugin: 'spring-boot'
2-
apply plugin: 'spinnaker-debpublish'
2+
apply plugin: 'nebula.ospackage'
33
apply plugin: 'groovy'
44

55
ext {
@@ -61,7 +61,7 @@ startScripts {
6161

6262
ospackage {
6363
packageName = project.applicationName
64-
version = project.version.replaceAll('-SNAPSHOT', '')
64+
version = project.version
6565
release '4'
6666
into "/opt/${project.applicationName}"
6767
from ("${project.buildDir}/install/${project.applicationName}")

gradle.properties

-2
This file was deleted.

gradle/codeStyle.xml

-56
This file was deleted.

gradle/wrapper/gradle-wrapper.jar

2.24 KB
Binary file not shown.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Jul 24 15:06:33 PDT 2014
1+
#Thu Nov 12 16:18:37 PST 2015
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-bin.zip

gradlew

+3-7
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ case "`uname`" in
4242
;;
4343
esac
4444

45-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
46-
if $cygwin ; then
47-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48-
fi
49-
5045
# Attempt to set APP_HOME
5146
# Resolve links: $0 may be a link
5247
PRG="$0"
@@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do
6156
fi
6257
done
6358
SAVED="`pwd`"
64-
cd "`dirname \"$PRG\"`/" >&-
59+
cd "`dirname \"$PRG\"`/" >/dev/null
6560
APP_HOME="`pwd -P`"
66-
cd "$SAVED" >&-
61+
cd "$SAVED" >/dev/null
6762

6863
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6964

@@ -114,6 +109,7 @@ fi
114109
if $cygwin ; then
115110
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116111
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112+
JAVACMD=`cygpath --unix "$JAVACMD"`
117113

118114
# We build the pattern for arguments to be converted via cygpath
119115
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`

kato/kato-cf/kato-cf.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ dependencies {
55
compile spinnaker.dependency('bootActuator')
66
compile project(":clouddriver-cf")
77
compile("org.cloudfoundry:cloudfoundry-client-lib:${cloudFoundryClientVersion}")
8-
9-
spinnaker.group("cf")
108
}

kato/kato-jedis/kato-jedis.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ dependencies {
1818
compile project(":kato:kato-core")
1919
compile spinnaker.dependency('jedis')
2020

21-
testCompile project(path: ':cats:cats-redis', configuration: 'test')
21+
testCompile project(':cats:cats-test')
2222
}

kato/kato-web/kato-web.gradle

-42
Original file line numberDiff line numberDiff line change
@@ -36,45 +36,3 @@ dependencies {
3636
testCompile ("org.springframework.boot:spring-boot-starter-test")
3737
}
3838

39-
/*
40-
applicationName = 'kato'
41-
applicationDefaultJvmArgs = ["-Djava.security.egd=file:/dev/./urandom"]
42-
applicationDistribution.from(project.file('config')) {
43-
into 'config'
44-
}
45-
*/
46-
47-
sourceSets {
48-
main {
49-
resources {
50-
srcDir 'src/main/resources'
51-
srcDir 'config'
52-
}
53-
}
54-
}
55-
56-
jar {
57-
doFirst {
58-
exclude "${rootProject.name}.yml"
59-
}
60-
}
61-
/*
62-
startScripts {
63-
doLast {
64-
unixScript.text = unixScript.text.replace('CLASSPATH=$APP_HOME', 'CLASSPATH=$APP_HOME/config:$APP_HOME')
65-
windowsScript.text = windowsScript.text.replace('set CLASSPATH=', 'set CLASSPATH=%APP_HOME%\\config;')
66-
}
67-
}
68-
69-
ospackage {
70-
packageName = project.applicationName
71-
version = project.version.replaceAll('-SNAPSHOT', '')
72-
release '3'
73-
into "/opt/${project.applicationName}"
74-
from ("${project.buildDir}/install/${project.applicationName}")
75-
}
76-
77-
buildDeb {
78-
dependsOn installApp
79-
}
80-
*/

mort/mort-web/mort-web.gradle

-14
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,3 @@ dependencies {
1313
compile spinnaker.dependency("korkSwagger")
1414
}
1515

16-
sourceSets {
17-
main {
18-
resources {
19-
srcDir 'src/main/resources'
20-
srcDir 'config'
21-
}
22-
}
23-
}
24-
25-
jar {
26-
doFirst {
27-
exclude "${rootProject.name}.yml"
28-
}
29-
}

oort/oort-cf/oort-cf.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ dependencies {
55
compile project(":clouddriver-cf")
66

77
spinnaker.group("bootWeb")
8-
spinnaker.group("cf")
9-
108
compile spinnaker.dependency("frigga")
119
}

oort/oort-web/oort-web.gradle

-44
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,3 @@ dependencies {
1616
compile spinnaker.dependency('eurekaClient')
1717
}
1818

19-
/*
20-
applicationName = 'oort'
21-
applicationDefaultJvmArgs = ["-Djava.security.egd=file:/dev/./urandom"]
22-
applicationDistribution.from(project.file('config')) {
23-
into "config"
24-
}
25-
*/
26-
27-
sourceSets {
28-
main {
29-
resources {
30-
srcDir 'src/main/resources'
31-
srcDir 'config'
32-
}
33-
}
34-
}
35-
36-
jar {
37-
doFirst {
38-
exclude "${rootProject.name}.yml"
39-
}
40-
}
41-
42-
/*
43-
startScripts {
44-
doLast {
45-
unixScript.text = unixScript.text.replace('CLASSPATH=$APP_HOME', 'CLASSPATH=$APP_HOME/config:$APP_HOME')
46-
windowsScript.text = windowsScript.text.replace('set CLASSPATH=', 'set CLASSPATH=%APP_HOME%\\config;')
47-
}
48-
}
49-
50-
ospackage {
51-
packageName = project.applicationName
52-
version = project.version.replaceAll("-SNAPSHOT", "")
53-
release '3'
54-
into "/opt/${project.applicationName}"
55-
from "${project.buildDir}/install/${project.applicationName}"
56-
}
57-
58-
buildDeb {
59-
dependsOn installApp
60-
requires("redis-server")
61-
}
62-
*/

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def subs = [
2020
kato: ["kato-core", "kato-web", "kato-aws", "kato-gce", "kato-manual", "kato-jedis", "kato-docker", "kato-cf", "kato-titan"],
2121
oort: ["oort-core", "oort-web", "oort-aws", "oort-gce", "oort-bench", "oort-titan", "oort-cf"],
2222
mort: ["mort-web", "mort-core", "mort-aws", "mort-gce"],
23-
cats: ["cats-core", "cats-redis"]
23+
cats: ["cats-core", "cats-redis", "cats-test"]
2424
]
2525

2626
def topLevels = [ 'clouddriver-core', 'clouddriver-security', 'clouddriver-web', 'clouddriver-aws', 'clouddriver-titan', 'clouddriver-google', 'clouddriver-cf' ]

0 commit comments

Comments
 (0)