Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix maven missing deps: upgrade nebula + gradle #693

Merged
merged 8 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/nebula-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
java: [ 8 ]
name: CI with Java ${{ matrix.java }}
steps:
- name: Setup Git
run: |
git config --global user.name "Mantis OSS Maintainers"
git config --global user.email "mantis-oss-dev@googlegroups.com"
- uses: actions/checkout@v1
- name: Setup jdk
uses: actions/setup-java@v1
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nebula-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Git
run: |
git config --global user.name "Mantis OSS Maintainers"
git config --global user.email "mantis-oss-dev@googlegroups.com"
- uses: actions/checkout@v2
- name: Setup jdk
uses: actions/setup-java@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nebula-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
environment:
name: Integrate Pull Request # Our protected environment variable
steps:
- name: Setup Git
run: |
git config --global user.name "Mantis OSS Maintainers"
git config --global user.email "mantis-oss-dev@googlegroups.com"
- name: Checkout PR
uses: actions/checkout@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
packages: write

steps:
- name: Setup Git
run: |
git config --global user.name "Mantis OSS Maintainers"
git config --global user.email "mantis-oss-dev@googlegroups.com"
- name: Checkout PR
uses: actions/checkout@v3
- name: Setup jdk
Expand Down
20 changes: 10 additions & 10 deletions baseline.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* limitations under the License.
*/

allprojects {
apply plugin: 'com.palantir.baseline-idea'
}
// allprojects {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete altogether instead of commenting?

// apply plugin: 'com.palantir.baseline-idea'
// }

subprojects {
// Currently, if any subproject applies the blanket Baseline plugin, it forces the Baseline plugin
// to be applied to ALL projects. And we are not prepared to address all of the build errors that
// occur as a result at this time.
// subprojects {
// // Currently, if any subproject applies the blanket Baseline plugin, it forces the Baseline plugin
// // to be applied to ALL projects. And we are not prepared to address all of the build errors that
// // occur as a result at this time.

apply plugin: 'com.palantir.baseline-exact-dependencies'
apply plugin: 'com.palantir.baseline-format'
}
// apply plugin: 'com.palantir.baseline-exact-dependencies'
// apply plugin: 'com.palantir.baseline-format'
// }
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ buildscript {
url "https://plugins.gradle.org/m2/"
}
maven { url 'https://artifacts-oss.netflix.net/maven-oss-releases' }
maven { url 'https://artifacts-oss.netflix.net/maven-oss-candidates' }
}
dependencies {
classpath 'com.netflix.nebula:gradle-netflixoss-project-plugin:10.6.0'
classpath 'com.netflix.nebula:gradle-netflixoss-project-plugin:11.5.0'
classpath 'com.netflix.nebula:nebula-dependency-recommender:11.+'
classpath 'io.mantisrx:mantis-gradle-plugin:1.2.+'
classpath "io.freefair.gradle:lombok-plugin:5.3.3.3"
classpath 'io.mantisrx:mantis-gradle-plugin:1.2.7-rc.4'
classpath "io.freefair.gradle:lombok-plugin:6.+"
classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
classpath("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0")
classpath("com.github.johnrengelman:shadow:8.1.1")
classpath 'gradle.plugin.org.inferred:gradle-processors:3.3.0'
classpath 'com.palantir.baseline:gradle-baseline-java:4.0.0'
// classpath 'com.palantir.baseline:gradle-baseline-java:4.+'
classpath 'com.bmuschko:gradle-docker-plugin:6.7.0'
classpath "com.palantir.gradle.gitversion:gradle-git-version:3.0.0"
}
Expand Down Expand Up @@ -104,9 +105,8 @@ project.snapshot.configure { finalizedBy printAllReleasedArtifacts }
subprojects {
apply plugin: 'java-library'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we add explicit dep on jar task for control-plane project here in subprojects block instead of adding to individual projects.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a specific handling between control-plane-core etc. and it feels a bit too generic to add these rules for all sub-proj?


// Apply lombok plugin and disabled the default config file generation.
// Apply lombok plugin.
apply plugin: "io.freefair.lombok"
generateLombokConfig.enabled = false
lombok {
version = "1.18.20"
}
Expand Down Expand Up @@ -186,4 +186,4 @@ subprojects {
}
}

apply from: file('baseline.gradle')
// apply from: file('baseline.gradle')
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 0 additions & 2 deletions mantis-connectors/mantis-connector-job/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

apply plugin: 'mantis'

ext {
gsonVersion = '2.8.+'
}
Expand Down
2 changes: 0 additions & 2 deletions mantis-connectors/mantis-connector-kafka/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

apply plugin: 'mantis'

ext {
archaiusVersion = '2.3.+'
spectatorVersion = '0.82.+'
Expand Down
7 changes: 7 additions & 0 deletions mantis-connectors/mantis-connector-publish/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ dependencies {
test {
useJUnitPlatform()
}

tasks.named('compileJava') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
tasks.named('delombok') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ dependencies {
testImplementation libraries.spectatorApi
testImplementation(testFixtures(project(":mantis-common")))
}

tasks.named('compileJava') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
tasks.named('delombok') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ task copyLibs(type: Copy) {
}

jar.dependsOn copyLibs
compileTestFixturesJava.dependsOn copyLibs
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ test {
maxRetries = 1
}
}

tasks.named('compileJava') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
tasks.named('delombok') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,10 @@ test {
maxRetries = 1
}
}

tasks.named('compileJava') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
tasks.named('delombok') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ test {
maxRetries = 1
}
}

tasks.named('compileJava') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
tasks.named('delombok') {
dependsOn project(':mantis-control-plane:mantis-control-plane-core').tasks.named('jar')
}
1 change: 0 additions & 1 deletion mantis-publish/mantis-publish-netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ test {
}

shadowJar {
classifier = null
relocate('com.fasterxml', 'io.mantisrx.shaded.com.fasterxml')
relocate('io.netty', 'io.mantisrx.shaded.io.netty')
relocate('META-INF/native/libnetty', 'META-INF/native/libio_mantisrx_shaded_netty')
Expand Down
1 change: 1 addition & 0 deletions mantis-server/mantis-server-agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@ docker {
dockerSyncBuildContext.dependsOn(pushServerJob.getTasksByName("mantisZipArtifact", false))
dockerSyncBuildContext.dependsOn(mantisExamplesSineFunctionMantisZipArtifact)
dockerSyncBuildContext.dependsOn(installDist)
dockerSyncBuildContext.dependsOn(project.tasks.processTestResources)

mainClassName = "io.mantisrx.server.agent.AgentV2Main"
1 change: 0 additions & 1 deletion mantis-shaded/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ dependencies {
}

shadowJar {
classifier = null
configurations = [project.configurations.shaded]

exclude 'META-INF/LICENSE'
Expand Down
Loading