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

Update to Gradle 8.5 #120

Merged
merged 1 commit into from
Jan 25, 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
1 change: 1 addition & 0 deletions .github/workflows/sql-jdbc-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
java:
- 11
- 17
- 21
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
42 changes: 25 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,24 @@ buildscript {

plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '4.0.1'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'jacoco'
id 'maven'
id 'maven-publish'
id 'signing'
}

group 'org.opensearch.driver'

// keep version in sync with version in Driver source
version '1.4.0.1'
version '1.4.0.2'

boolean snapshot = "true".equals(System.getProperty("build.snapshot", "false"));
if (snapshot) {
version += "-SNAPSHOT"
}

jacoco {
toolVersion = "0.8.3"
toolVersion = "0.8.11"
}

sourceCompatibility = 8
Expand All @@ -52,11 +51,11 @@ dependencies {

testImplementation('org.junit.jupiter:junit-jupiter-api:5.3.1')
testImplementation('org.junit.jupiter:junit-jupiter-params:5.3.1')
testImplementation('com.github.tomakehurst:wiremock:3.0.0-beta-2')
testImplementation('org.mockito:mockito-core:2.23.0')
testImplementation('com.github.tomakehurst:wiremock-jre8-standalone:2.35.1')
testImplementation('org.mockito:mockito-core:4.11.0')
testImplementation('org.junit.jupiter:junit-jupiter-engine:5.3.1')
testImplementation('org.junit-pioneer:junit-pioneer:0.3.0')
testImplementation('org.eclipse.jetty:jetty-server:11.0.14')
testImplementation('org.eclipse.jetty:jetty-server:11.0.19')

// Enforce wiremock to use latest guava and json-smart
testImplementation('com.google.guava:guava:32.0.1-jre')
Expand Down Expand Up @@ -91,9 +90,15 @@ static def getShadowPath(String path) {
return 'org.opensearch.sql.jdbc.shadow.' + path
}

jar {
enabled = false
dependsOn(shadowJar { archiveClassifier = null })
}

shadowJar {
baseName = rootProject.name + "-shadow"
classifier = ''
archiveBaseName = rootProject.name + "-shadow"
archiveClassifier = null

exclude 'META-INF/maven/commons-*/**'
exclude 'META-INF/maven/org.apache.*/**'
exclude 'META-INF/maven/joda-time/**'
Expand All @@ -118,12 +123,12 @@ test {
}

task sourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier = 'sources'
from sourceSets.main.allJava
}

task javadocJar(type: Jar) {
classifier "javadoc"
archiveClassifier = "javadoc"
from javadoc.destinationDir
}

Expand Down Expand Up @@ -215,12 +220,12 @@ signing {
}

jacoco {
toolVersion = "0.8.3"
toolVersion = "0.8.11"
}

jacocoTestReport {
reports {
html.enabled true
html.required = true
}
}
test.finalizedBy(project.tasks.jacocoTestReport)
Expand All @@ -238,11 +243,14 @@ jacocoTestCoverageVerification {
configurations.all {
// fixes https://www.mend.io/vulnerability-database/CVE-2023-24998
resolutionStrategy.force 'commons-fileupload:commons-fileupload:1.5'
resolutionStrategy.force 'org.eclipse.jetty:jetty-client:11.0.14'
resolutionStrategy.force 'org.eclipse.jetty:jetty-servlets:11.0.14'
resolutionStrategy.force 'org.eclipse.jetty:jetty-webapp:11.0.14'
resolutionStrategy.force 'org.eclipse.jetty:jetty-client:11.0.19'
resolutionStrategy.force 'org.eclipse.jetty:jetty-servlets:11.0.19'
resolutionStrategy.force 'org.eclipse.jetty:jetty-webapp:11.0.19'
resolutionStrategy.force 'org.eclipse.jetty:jetty-xml:11.0.19'
}


tasks.withType(GenerateModuleMetadata) {
dependsOn javadocJar, sourcesJar
}

check.dependsOn jacocoTestCoverageVerification
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=b7aedd369a26b177147bcb715f8b1fc4fe32b0a6ade0d7fd8ee5ed0c6f731f2c
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading