Skip to content
This repository was archived by the owner on Oct 2, 2025. It is now read-only.

Commit e2ba054

Browse files
feat(front50-bom): publish front50-bom (#547)
* feat(front50-bom): publish front50-bom This simplifies dependency resolution downstream
1 parent c33a3f4 commit e2ba054

File tree

9 files changed

+102
-51
lines changed

9 files changed

+102
-51
lines changed

build.gradle

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,47 +29,48 @@ buildscript {
2929
}
3030

3131
allprojects { project ->
32+
group = "com.netflix.spinnaker.front50"
3233
apply plugin: 'spinnaker.base-project'
3334
if (Boolean.valueOf(enablePublishing)) {
3435
apply plugin: "spinnaker.project"
3536
}
36-
apply plugin: 'java-library'
37-
apply plugin: 'groovy'
3837

39-
group = "com.netflix.spinnaker.front50"
38+
if (name != "front50-bom") {
39+
apply plugin: 'java-library'
40+
apply plugin: 'groovy'
4041

41-
test {
42-
testLogging {
43-
exceptionFormat = 'full'
42+
test {
43+
testLogging {
44+
exceptionFormat = 'full'
45+
}
4446
}
45-
}
4647

47-
tasks.withType(JavaExec) {
48-
if (System.getProperty('DEBUG', 'false') == 'true') {
49-
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8180'
48+
tasks.withType(JavaExec) {
49+
if (System.getProperty('DEBUG', 'false') == 'true') {
50+
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8180'
51+
}
5052
}
51-
}
5253

53-
dependencies {
54-
implementation platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
55-
annotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
56-
testAnnotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
54+
dependencies {
55+
implementation(platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion"))
56+
annotationProcessor(platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion"))
57+
testAnnotationProcessor(platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion"))
5758

58-
implementation "org.codehaus.groovy:groovy-all"
59-
implementation "net.logstash.logback:logstash-logback-encoder"
59+
implementation("org.codehaus.groovy:groovy-all")
60+
implementation("net.logstash.logback:logstash-logback-encoder")
6061

61-
compileOnly "org.projectlombok:lombok"
62-
annotationProcessor "org.projectlombok:lombok"
63-
testAnnotationProcessor "org.projectlombok:lombok"
62+
compileOnly("org.projectlombok:lombok")
63+
annotationProcessor("org.projectlombok:lombok")
64+
testAnnotationProcessor("org.projectlombok:lombok")
6465

65-
testImplementation "org.spockframework:spock-core"
66-
testImplementation "org.springframework.boot:spring-boot-starter-test"
67-
testImplementation "org.spockframework:spock-core"
68-
testImplementation "org.spockframework:spock-spring"
69-
testImplementation "org.springframework:spring-test"
70-
testImplementation "org.hamcrest:hamcrest-core"
71-
testRuntimeOnly "cglib:cglib-nodep"
72-
testRuntimeOnly "org.objenesis:objenesis"
66+
testImplementation("org.spockframework:spock-core")
67+
testImplementation("org.springframework.boot:spring-boot-starter-test")
68+
testImplementation("org.spockframework:spock-spring")
69+
testImplementation("org.springframework:spring-test")
70+
testImplementation("org.hamcrest:hamcrest-core")
71+
testRuntimeOnly("cglib:cglib-nodep")
72+
testRuntimeOnly("org.objenesis:objenesis")
73+
}
7374
}
7475
}
7576

front50-bom/front50-bom.gradle

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright 2019 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: "java-platform"
18+
apply plugin: "maven-publish"
19+
20+
// without this building the pom fails when using the Nebula publishing plugin
21+
configurations {
22+
create("compileOnly")
23+
}
24+
25+
javaPlatform {
26+
allowDependencies()
27+
}
28+
29+
30+
if (Boolean.valueOf(enablePublishing)) {
31+
publishing {
32+
publications {
33+
nebula(MavenPublication) {
34+
from components.javaPlatform
35+
}
36+
}
37+
}
38+
}
39+
40+
dependencies {
41+
api(platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion"))
42+
43+
constraints {
44+
api("com.netflix.spinnaker.fiat:fiat-api:$fiatVersion")
45+
api("com.netflix.spinnaker.fiat:fiat-core:$fiatVersion")
46+
47+
rootProject
48+
.subprojects
49+
.findAll { it != project }
50+
.each { api(project(it.path)) }
51+
}
52+
}

front50-core/src/main/groovy/com/netflix/spinnaker/front50/model/ItemDAO.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ public interface ItemDAO<T> {
1212
/**
1313
* It can be expensive to refresh a bucket containing a large number of objects.
1414
*
15-
* <p>When {@code refresh} is false, the most recently cached set of objects will be returned.
15+
* @param refresh true to refresh
16+
* @return When {@code refresh} is false, the most recently cached set of objects will be
17+
* returned. *
1618
*/
1719
Collection<T> all(boolean refresh);
1820

front50-core/src/main/groovy/com/netflix/spinnaker/front50/model/StorageService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public interface StorageService {
2626
/** Check to see if the bucket exists, creating it if it is not there. */
2727
void ensureBucketExists();
2828

29-
/** Returns true if the storage service supports versioning. */
29+
/** @return true if the storage service supports versioning. */
3030
boolean supportsVersioning();
3131

3232
default boolean supportsEventing(ObjectType objectType) {

front50-core/src/main/groovy/com/netflix/spinnaker/front50/validator/PipelineValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
public interface PipelineValidator {
2424
/**
2525
* @param pipeline the pipeline being modified
26-
* @param errors specific validation errors for {@param pipeline}
26+
* @param errors specific validation errors for @param pipeline
2727
*/
2828
void validate(Pipeline pipeline, Errors errors);
2929
}

gradle/buildViaTravis.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
# This script will build the project.
33

4-
GRADLE="./gradlew -I gradle/init-publish.gradle"
4+
GRADLE="./gradlew -PenablePublishing=true"
55

66
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
77
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
8-
$GRADLE -Prelease.useLastTag=true build
8+
$GRADLE build
99
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
1010
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
1111
$GRADLE -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace
@@ -23,6 +23,6 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
2323
esac
2424
else
2525
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
26-
$GRADLE -Prelease.useLastTag=true build
26+
$GRADLE build
2727
fi
2828

gradle/init-publish.gradle

Lines changed: 0 additions & 14 deletions
This file was deleted.

gradle/installViaTravis.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# This script will build the project.
33

4-
GRADLE="./gradlew -I gradle/init-publish.gradle"
4+
GRADLE="./gradlew -PenablePublishing=true"
55

66
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
77
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
@@ -11,7 +11,7 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
1111
$GRADLE -Prelease.travisci=true assemble
1212
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
1313
echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
14-
$GRADLE -Prelease.travisci=true -Prelease.useLastTag=true assemble
14+
$GRADLE -Prelease.travisci=true assemble
1515
else
1616
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
1717
$GRADLE assemble

settings.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616

1717
rootProject.name = "front50"
1818

19-
include 'front50-web', 'front50-core', 'front50-gcs', 'front50-redis', 'front50-s3', 'front50-test', 'front50-migrations', 'front50-azure', 'front50-swift', 'front50-oracle'
19+
include 'front50-web',
20+
'front50-core',
21+
'front50-gcs',
22+
'front50-redis',
23+
'front50-s3',
24+
'front50-test',
25+
'front50-migrations',
26+
'front50-azure',
27+
'front50-swift',
28+
'front50-oracle',
29+
'front50-bom'
2030

2131
def setBuildFile(project) {
2232
project.buildFileName = "${project.name}.gradle"

0 commit comments

Comments
 (0)