Skip to content

Commit 2836c66

Browse files
committed
More updates
* Downgrade to Gradle 6.9 * Upgrade to Reactor Core 3.4.6 and Reactor Netty 1.0.7 * Remove redundant Travis CI and Shippable configs * Update artifact version to 1.0-SNAPSHOT in gradle.properties and in manifests
1 parent 6fe5024 commit 2836c66

File tree

10 files changed

+65
-81
lines changed

10 files changed

+65
-81
lines changed

.github/workflows/gradle.yml renamed to .github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,3 @@ jobs:
2424
restore-keys: ${{ runner.os }}-gradle
2525
- name: Build with Gradle
2626
run: ./gradlew build
27-
# - name: Upload Artifacts
28-
# uses: actions/upload-artifact@v1
29-
# with:
30-
# name: Package
31-
# path: build/libs

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish package to GitHub Packages
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-java@v2
14+
with:
15+
java-version: '11'
16+
distribution: 'adopt'
17+
- name: Publish package
18+
run: ./gradlew -Pversion=${{ github.event.release.tag_name }} publish
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

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

build.gradle

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'com.gorylenko.gradle-git-properties' version '2.3.1'
33
id 'org.springframework.boot' version '2.4.5'
4+
// id 'org.springframework.experimental.aot' version '0.9.2'
45
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
56
id 'com.github.ben-manes.versions' version '0.38.0'
67
id 'io.franzbecker.gradle-lombok' version '4.0.0'
@@ -39,19 +40,17 @@ spotbugsMain {
3940
}
4041

4142
group = 'io.pivotal'
42-
version = '0.1-SNAPSHOT'
4343
sourceCompatibility = JavaVersion.VERSION_11
4444

4545
repositories {
46-
mavenCentral()
47-
maven { url "https://repo.spring.io/snapshot" }
48-
maven { url "https://repo.spring.io/milestone" }
46+
maven { url 'https://repo.spring.io/release' }
47+
mavenCentral()
4948
}
5049

5150
ext {
52-
set('springCloudServicesVersion', '3.2.0.RELEASE')
53-
set('springCloudVersion', "2020.0.1")
54-
set('spring-cloud-services-connectors.version', '3.2.0.RELEASE')
51+
set('springCloudServicesVersion', '3.2.1.RELEASE')
52+
set('springCloudVersion', '2020.0.2')
53+
set('spring-cloud-services-connectors.version', '3.2.1.RELEASE')
5554
}
5655

5756
dependencyManagement {
@@ -61,13 +60,36 @@ dependencyManagement {
6160
}
6261
}
6362

63+
// bootBuildImage {
64+
// builder = "paketobuildpacks/builder:tiny"
65+
// environment = [
66+
// "BP_NATIVE_IMAGE" : "true"
67+
// ]
68+
// }
69+
6470
bootRun {
6571
// support passing -Dsystem.property=value to bootRun task
6672
systemProperties = System.properties
6773
}
6874

6975
configurations {
76+
// exclude Logback
7077
implementation.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
78+
[apiElements, runtimeElements].each {
79+
it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(jar) }
80+
it.outgoing.artifact(bootJar)
81+
}
82+
}
83+
84+
test {
85+
useJUnitPlatform()
86+
testLogging {
87+
events "passed", "skipped", "failed"
88+
exceptionFormat "full"
89+
showCauses true
90+
showExceptions true
91+
showStackTraces true
92+
}
7193
}
7294

7395
java {
@@ -76,7 +98,7 @@ java {
7698
}
7799

78100
jacoco {
79-
toolVersion = "0.8.6"
101+
toolVersion = "0.8.7"
80102
}
81103

82104
jacocoTestReport {
@@ -87,16 +109,6 @@ jacocoTestReport {
87109
}
88110
}
89111

90-
test {
91-
useJUnitPlatform()
92-
testLogging {
93-
events "passed", "skipped", "failed"
94-
exceptionFormat "full"
95-
showCauses true
96-
showExceptions true
97-
showStackTraces true
98-
}
99-
}
100112

101113
pitest {
102114
testPlugin = "junit5"
@@ -120,8 +132,8 @@ dependencies {
120132
implementation('org.springframework.boot:spring-boot-starter-log4j2')
121133
implementation('com.lmax:disruptor:3.4.4')
122134
implementation('org.apache.httpcomponents:httpclient:4.5.13')
123-
implementation('io.projectreactor:reactor-core:3.4.5')
124-
implementation('io.projectreactor.netty:reactor-netty:1.0.6')
135+
implementation('io.projectreactor:reactor-core:3.4.6')
136+
implementation('io.projectreactor.netty:reactor-netty:1.0.7')
125137
implementation('io.micrometer:micrometer-registry-prometheus')
126138
testImplementation('io.projectreactor:reactor-test')
127139
testImplementation('org.assertj:assertj-core:3.19.0')
@@ -138,7 +150,8 @@ dependencies {
138150

139151
publishing {
140152
publications {
141-
mavenJava(MavenPublication) {
153+
gpr(MavenPublication) {
154+
142155
from components.java
143156
versionMapping {
144157
usage('java-api') {
@@ -174,10 +187,12 @@ publishing {
174187
}
175188
repositories {
176189
maven {
177-
// change URLs to point to your repos, e.g. http://my.org/repo
178-
def releasesRepoUrl = "$buildDir/repos/releases"
179-
def snapshotsRepoUrl = "$buildDir/repos/snapshots"
180-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
190+
name = "GitHubPackages"
191+
url = "https://maven.pkg.github.com/pacphi/cf-hoover"
192+
credentials {
193+
username = System.getenv("GITHUB_ACTOR")
194+
password = System.getenv("GITHUB_TOKEN")
195+
}
181196
}
182197
}
183198
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=1.0-SNAPSHOT

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ 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-7.0-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip

manifest.with-registry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ applications:
44
memory: 2G
55
random-route: true
66
stack: cflinuxfs3
7-
path: build/libs/cf-hoover-0.1-SNAPSHOT.jar
7+
path: build/libs/cf-hoover-1.0-SNAPSHOT.jar
88
instances: 1
99
env:
1010
JAVA_OPTS: -XX:MaxDirectMemorySize=512m -Djava.security.egd=file:///dev/urandom

manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ applications:
44
memory: 2G
55
random-route: true
66
stack: cflinuxfs3
7-
path: build/libs/cf-hoover-0.1-SNAPSHOT.jar
7+
path: build/libs/cf-hoover-1.0-SNAPSHOT.jar
88
instances: 1
99
env:
1010
JAVA_OPTS: -XX:MaxDirectMemorySize=512m -Djava.security.egd=file:///dev/urandom

settings.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
pluginManagement {
22
repositories {
3-
maven { url 'https://repo.spring.io/snapshot' }
4-
maven { url 'https://repo.spring.io/milestone' }
3+
maven { url 'https://repo.spring.io/release' }
54
gradlePluginPortal()
65
}
7-
resolutionStrategy {
8-
eachPlugin {
9-
if (requested.id.id == 'org.springframework.boot') {
10-
useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
11-
}
12-
}
13-
}
146
}
157
rootProject.name = 'cf-hoover'

shippable.yml

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

0 commit comments

Comments
 (0)