-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependency gradle to v8 (#610)
* Update dependency gradle to v8 * Fixes build issues * Upgrade to kotlin dsl Build * Downgrade version for build to pass --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Raja Kolli <[email protected]>
- Loading branch information
1 parent
5701469
commit a7aac50
Showing
18 changed files
with
274 additions
and
395 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent.* | ||
import java.io.Reader | ||
import java.util.* | ||
|
||
plugins { | ||
java | ||
id("org.springframework.boot") version "3.1.0" | ||
id("io.spring.dependency-management") version "1.1.0" | ||
id("com.diffplug.spotless") version "6.18.0" | ||
id("com.gorylenko.gradle-git-properties") version "2.4.1" | ||
id("org.owasp.dependencycheck") version "8.2.1" | ||
jacoco | ||
id("org.sonarqube") version "4.0.0.2929" | ||
} | ||
|
||
group = "com.example.graphql" | ||
version = "0.0.1-SNAPSHOT" | ||
java.sourceCompatibility = JavaVersion.VERSION_17 | ||
|
||
configurations { | ||
compileOnly { | ||
extendsFrom(configurations.annotationProcessor.get()) | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url = uri("https://repo.spring.io/milestone") } | ||
} | ||
|
||
dependencies { | ||
implementation("org.springframework.boot:spring-boot-starter-graphql") | ||
implementation("org.springframework.boot:spring-boot-starter-actuator") | ||
implementation("org.springframework.boot:spring-boot-starter-webflux") | ||
|
||
compileOnly("org.projectlombok:lombok") | ||
annotationProcessor("org.projectlombok:lombok") | ||
implementation("org.springframework.boot:spring-boot-starter-data-r2dbc") | ||
// Needed to run liquibase | ||
implementation("org.springframework:spring-jdbc") | ||
// Needed for pointcut | ||
implementation("org.springframework.boot:spring-boot-starter-aop") | ||
|
||
runtimeOnly ("org.postgresql:r2dbc-postgresql") | ||
runtimeOnly ("org.postgresql:postgresql") | ||
implementation("org.liquibase:liquibase-core") | ||
implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.1.0") | ||
implementation("org.apache.commons:commons-lang3") | ||
|
||
testImplementation("org.springframework.boot:spring-boot-starter-test") | ||
testImplementation("org.springframework.boot:spring-boot-testcontainers") | ||
testImplementation("io.projectreactor:reactor-test") | ||
testImplementation("org.projectlombok:lombok") | ||
testImplementation("org.awaitility:awaitility") | ||
testImplementation("org.testcontainers:junit-jupiter") | ||
testImplementation("org.testcontainers:postgresql") | ||
testImplementation("org.testcontainers:r2dbc") | ||
testImplementation("org.springframework.graphql:spring-graphql-test") | ||
} | ||
|
||
defaultTasks "bootRun" | ||
|
||
springBoot { | ||
buildInfo() | ||
} | ||
|
||
tasks.withType<Test> { | ||
useJUnitPlatform() | ||
|
||
testLogging { | ||
events = setOf(PASSED, FAILED, SKIPPED) | ||
showStandardStreams = true | ||
exceptionFormat = FULL | ||
} | ||
finalizedBy(tasks.jacocoTestReport, tasks.jacocoTestCoverageVerification) | ||
} | ||
|
||
jacoco { | ||
toolVersion = "0.8.10" | ||
//reportsDirectory.set(layout.buildDirectory.dir("customJacocoReportDir")) | ||
} | ||
|
||
tasks.jacocoTestReport { | ||
dependsOn(tasks.test) | ||
reports { | ||
xml.required.set(false) | ||
csv.required.set(false) | ||
html.outputLocation.set(layout.buildDirectory.dir("reports/jacoco")) | ||
} | ||
} | ||
|
||
tasks.jacocoTestCoverageVerification { | ||
violationRules { | ||
rule { | ||
element = "BUNDLE" | ||
//includes = listOf("com.sivalabs.*") | ||
|
||
limit { | ||
counter = "LINE" | ||
value = "COVEREDRATIO" | ||
minimum = "0.63".toBigDecimal() | ||
} | ||
} | ||
} | ||
} | ||
|
||
gitProperties { | ||
failOnNoGitDirectory = false | ||
keys = listOf("git.branch", | ||
"git.commit.id.abbrev", | ||
"git.commit.user.name", | ||
"git.commit.message.full") | ||
} | ||
|
||
spotless { | ||
java { | ||
importOrder() | ||
removeUnusedImports() | ||
palantirJavaFormat("2.30.0") | ||
formatAnnotations() | ||
} | ||
} | ||
|
||
// Reference doc : https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html | ||
dependencyCheck { | ||
// the default artifact types that will be analyzed. | ||
analyzedTypes = listOf("jar") | ||
// CI-tools usually needs XML-reports, but humans needs HTML. | ||
formats = listOf("HTML", "JUNIT") | ||
// Specifies if the build should be failed if a CVSS score equal to or above a specified level is identified. | ||
// failBuildOnCVSS = 8.toFloat() | ||
// Output directory where the report should be generated | ||
outputDirectory = "$buildDir/reports/dependency-vulnerabilities" | ||
// specify a list of known issues which contain false-positives to be suppressed | ||
//suppressionFiles = ["$projectDir/config/dependencycheck/dependency-check-suppression.xml"] | ||
// Sets the number of hours to wait before checking for new updates from the NVD, defaults to 4. | ||
cveValidForHours = 24 | ||
} | ||
|
||
sonarqube { | ||
properties { | ||
property("sonar.sourceEncoding", "UTF-8") | ||
property("sonar.projectKey", "rajadilipkolli_mfscreener") | ||
property("sonar.organization", "rajadilipkolli") | ||
property("sonar.host.url", "https://sonarcloud.io") | ||
property("sonar.sources", "src/main/java") | ||
property("sonar.tests", "src/test/java") | ||
property("sonar.exclusions", "src/main/java/**/config/*.*,src/main/java/**/entities/*.*,src/main/java/**/models/*.*,src/main/java/**/exceptions/*.*,src/main/java/**/utils/*.*,src/main/java/**/*Application.*") | ||
property("sonar.test.inclusions", "**/*Test.java,**/*IntegrationTest.java,**/*IT.java") | ||
property("sonar.java.codeCoveragePlugin", "jacoco") | ||
property("sonar.coverage.jacoco.xmlReportPaths", "$buildDir/jacoco/test/jacoco.xml") | ||
property("sonar.junit.reportPaths", "$buildDir/test-results/test") | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
67 changes: 0 additions & 67 deletions
67
graphql/spring-boot-graphql-webflux/gradle/code-quality.gradle
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.