Skip to content

Commit

Permalink
[FSSDK-11016] chore: update gradle from 6.5 to 7.2 (#553)
Browse files Browse the repository at this point in the history
Update gradle to 7.2
  • Loading branch information
muzahidul-opti authored Jan 2, 2025
1 parent a763358 commit 392d679
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Check on success
if: always() && steps.unit_tests.outcome == 'success'
run: |
./gradlew coveralls uploadArchives --console plain
./gradlew coveralls --console plain
publish:
if: startsWith(github.ref, 'refs/tags/')
Expand Down
36 changes: 22 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
plugins {
id 'com.github.kt3k.coveralls' version '2.8.2'
id 'com.github.kt3k.coveralls' version '2.12.2'
id 'jacoco'
id 'me.champeau.gradle.jmh' version '0.4.5'
id 'me.champeau.gradle.jmh' version '0.5.3'
id 'nebula.optional-base' version '3.2.0'
id 'com.github.hierynomus.license' version '0.15.0'
id 'com.github.hierynomus.license' version '0.16.1'
id 'com.github.spotbugs' version "4.5.0"
id 'maven-publish'
}

allprojects {
Expand Down Expand Up @@ -94,23 +95,30 @@ configure(publishedProjects) {
}

dependencies {
compile group: 'commons-codec', name: 'commons-codec', version: commonCodecVersion
implementation group: 'commons-codec', name: 'commons-codec', version: commonCodecVersion

testCompile group: 'junit', name: 'junit', version: junitVersion
testCompile group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: hamcrestVersion
testCompile group: 'com.google.guava', name: 'guava', version: guavaVersion
testImplementation group: 'junit', name: 'junit', version: junitVersion
testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: hamcrestVersion
testImplementation group: 'com.google.guava', name: 'guava', version: guavaVersion

// logging dependencies (logback)
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion
testCompile group: 'ch.qos.logback', name: 'logback-core', version: logbackVersion
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion
testImplementation group: 'ch.qos.logback', name: 'logback-core', version: logbackVersion

testCompile group: 'com.google.code.gson', name: 'gson', version: gsonVersion
testCompile group: 'org.json', name: 'json', version: jsonVersion
testCompile group: 'com.googlecode.json-simple', name: 'json-simple', version: jsonSimpleVersion
testCompile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion
testImplementation group: 'com.google.code.gson', name: 'gson', version: gsonVersion
testImplementation group: 'org.json', name: 'json', version: jsonVersion
testImplementation group: 'com.googlecode.json-simple', name: 'json-simple', version: jsonSimpleVersion
testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion
}

configurations.all {
resolutionStrategy {
force "junit:junit:${junitVersion}"
}
}


def docTitle = "Optimizely Java SDK"
if (name.equals('core-httpclient-impl')) {
docTitle = "Optimizely Java SDK: Httpclient"
Expand Down
17 changes: 12 additions & 5 deletions core-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jacksonVersion

compile group: 'com.google.code.findbugs', name: 'annotations', version: findbugsAnnotationVersion
compile group: 'com.google.code.findbugs', name: 'jsr305', version: findbugsJsrVersion
implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jacksonVersion
implementation group: 'com.google.code.findbugs', name: 'annotations', version: findbugsAnnotationVersion
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: findbugsJsrVersion
testImplementation group: 'junit', name: 'junit', version: junitVersion
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion

// an assortment of json parsers
compileOnly group: 'com.google.code.gson', name: 'gson', version: gsonVersion, optional
Expand All @@ -12,6 +13,11 @@ dependencies {
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion, optional
}

tasks.named('processJmhResources') {
duplicatesStrategy = DuplicatesStrategy.WARN
}


test {
useJUnit {
excludeCategories 'com.optimizely.ab.categories.ExhaustiveTest'
Expand All @@ -24,6 +30,7 @@ task exhaustiveTest(type: Test) {
}
}


task generateVersionFile {
// add the build version information into a file that'll go into the distribution
ext.buildVersion = new File(projectDir, "src/main/resources/optimizely-build-version")
Expand Down
9 changes: 5 additions & 4 deletions core-httpclient-impl/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
dependencies {
compile project(':core-api')
compileOnly group: 'com.google.code.gson', name: 'gson', version: gsonVersion
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: httpClientVersion
testCompile 'org.mock-server:mockserver-netty:5.1.1'
implementation project(':core-api')
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: httpClientVersion
implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: findbugsJsrVersion
testImplementation 'org.mock-server:mockserver-netty:5.1.1'
}

task exhaustiveTest {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Sep 24 09:56:45 PDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

0 comments on commit 392d679

Please sign in to comment.