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

Support Spring Boot 3 and jakarta #882

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
abc4375
Bump major version; Update javax to jakarta throughout
joshuapsteele Oct 2, 2023
0b45ee3
Bump Gradle to 8.3
Oct 2, 2023
7d3f44d
Version bumps
Oct 2, 2023
f632c39
Bump deltaspike for CDI tests
Oct 3, 2023
ef03704
crnk-setup-spring-boot3 and remove 1 and 2
Oct 3, 2023
8f2bd53
Disable CDI tests, more version bumps
Oct 3, 2023
817e3d4
Various version bumps
Oct 4, 2023
28de3e9
Fix vertx/reactive
Oct 4, 2023
40fa9f7
Use a different ProGuard dependency
Oct 4, 2023
fadf0c7
Update mockito, equalsverifier, tests
Oct 4, 2023
c954d0e
Fix hibernate dependencies
Oct 4, 2023
6f1de8d
Re-enable CDI
Oct 4, 2023
2d59640
Update swagger versions
Oct 5, 2023
0af64b8
Update commons-io version
Oct 5, 2023
e916d1f
Fix java 17 source/target version
Oct 5, 2023
8981853
Update dropwizard version and example
Oct 5, 2023
171da43
Bump graphviz-java to latest version
Oct 5, 2023
8861c21
Remove unneeded dependency
Oct 5, 2023
a665a99
A few small version bumps, remove unused deps
Oct 6, 2023
a7ed9f7
Start MVC Observation classes
Oct 18, 2023
12809ef
fixup! Start MVC Observation classes
Oct 18, 2023
8d60afc
Bring in Spring Boot deps to projects that need them
Oct 18, 2023
b27c18b
Add equalsverifier dependency to crnk-core
Oct 18, 2023
65bd339
Cleanup unneeded dependencies
Oct 18, 2023
fee8476
Cleanup dependencies
Oct 18, 2023
7091ddc
Use jakarta variants of jackson dependencies
Oct 19, 2023
fa63bcb
Start updating documentation
Oct 19, 2023
a2c1861
Replace context.destroy() with context.stop() in AbstractJpaJerseyTest
joshuapsteele Oct 19, 2023
3def931
Replace CrnkWebMvcTagsProvider and CrnkSpringActuatorMetricsAutoConfi…
joshuapsteele Oct 19, 2023
8b6f40a
Clean up AutoConfiguration import file
joshuapsteele Oct 19, 2023
cf7f8be
Javax to jakarta fixes (#1)
tory-kk Sep 4, 2024
365251d
Merge pull request #3 from tory-kk/JAVAX-TO-JAKARTA
kjthorpe18 Sep 7, 2024
496aad0
Remove spring-boot-starter-actuator from dependencies as it is no lon…
Illapikov Oct 10, 2024
10bd990
Merge pull request #4 from tory-kk/remove-actuator
kjthorpe18 Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
359 changes: 181 additions & 178 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ buildscript {
def depMgmtVersion = versions['dependency.management.plugin.version']

classpath "io.spring.gradle:dependency-management-plugin:${depMgmtVersion}"
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.9.2'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
classpath 'com.moowork.gradle:gradle-node-plugin:1.1.1'
classpath 'org.ajoberstar.git-publish:gradle-git-publish:3.0.1'
classpath 'org.ajoberstar.grgit:grgit-gradle:4.1.1'
Expand All @@ -24,9 +22,8 @@ buildscript {
import com.vanniktech.maven.publish.JavaLibrary
import com.vanniktech.maven.publish.JavadocJar


wrapper {
gradleVersion = '6.9.2'
gradleVersion = '8.3'
}

apply plugin: 'jdk-bootstrap'
Expand Down Expand Up @@ -74,19 +71,21 @@ gradle.beforeProject { Project project ->

if (!docs) {
apply plugin: 'java'
apply plugin: 'java-library'

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 1.17
targetCompatibility = 1.17

if (!bom) {
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version: '1.10.19'
testCompile group: 'org.assertj', name: 'assertj-core', version: '2.2.0'
// https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api
compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.2'
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.4.0-b180830.0359'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.5.0'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.24.2'
// https://mvnrepository.com/artifact/jakarta.annotation/jakarta.annotation-api
api group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '2.1.1'
// https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api
api group: 'jakarta.xml.bind', name: 'jakarta.xml.bind-api', version: '4.0.1'
api 'org.glassfish.jaxb:jaxb-runtime:4.0.1'
}

test {
Expand All @@ -107,178 +106,182 @@ gradle.beforeProject { Project project ->
dependencyManagement {
imports {
mavenBom 'io.projectreactor:reactor-bom:Bismuth-RELEASE'
mavenBom 'org.glassfish.jersey:jersey-bom:2.26'
mavenBom 'org.glassfish.jersey:jersey-bom:3.1.3'
}
dependencies {
dependency 'com.fasterxml.jackson.core:jackson-databind:2.9.10'
dependency 'com.fasterxml.jackson.core:jackson-annotations:2.9.10'
dependency 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10'
dependency 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.10'
dependency 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.9.10'
dependency 'com.fasterxml.jackson.core:jackson-core:2.9.10'
dependency 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10'

dependency 'org.reflections:reflections:0.9.11'
}
}
}
}

// TODO gradle publishing to maven central?
if (!docs && !examples && !testProject && !legacyBraveProject) {
apply plugin: "jacoco"
jacoco {
toolVersion = "0.8.5"
}

rootProject.tasks.jacocoMerge.executionData tasks.withType(Test)
rootProject.tasks.jacocoRootReport.additionalSourceDirs files(sourceSets.main.allSource.srcDirs)

def sourceDirs = rootProject.tasks.jacocoRootReport.sourceDirectories
def classDirs = rootProject.tasks.jacocoRootReport.classDirectories

def mainOutput = files(files(sourceSets.main.output).collect {
fileTree(dir: it, exclude: '**/legacy/**')
})

rootProject.tasks.jacocoRootReport.sourceDirectories.from files(sourceSets.main.allSource.srcDirs)
rootProject.tasks.jacocoRootReport.classDirectories.from mainOutput

rootProject.coveralls.sourceDirs.addAll(sourceSets.main.allSource.srcDirs.flatten())

jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
}

apply plugin: 'maven-publish'

if (!docs && !examples) {

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

task javadocJar(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
classifier = 'javadoc'
}


plugins.withId("com.vanniktech.maven.publish.base") {
group = GROUP_ID

mavenPublishing {
publishToMavenCentral("DEFAULT")

// Will only apply to non snapshot builds.
// Uses credentials as described above, supports both regular and in memory signing.
signAllPublications()

pom {
name = "Crnk"
description = "A description of what my library does."
inceptionYear = "2020"
url = "https ://github.com/crnk-project/crnk-framework/"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "crnk"
name = "crnk"
url = "https://github.com/crnk-project/"
}
}
scm {
url = "https://github.com/crnk-project/crnk-framework"
connection = "scm:git:git://github.com/crnk-project/crnk-framework.git"
developerConnection = "scm:git:ssh://git@github.com/crnk-project/crnk-framework.git"
}
// dependency 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
dependency 'com.fasterxml.jackson.core:jackson-annotations:2.15.2'
dependency 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2'
dependency 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.15.2'
dependency 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.15.2'
dependency 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.2'
dependency 'com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.15.2'

dependency 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
dependency 'org.glassfish.jaxb:jaxb-runtime:4.0.1'

dependency 'org.reflections:reflections:0.10.2'
}
}
}

apply plugin: "com.vanniktech.maven.publish.base"

mavenPublishing {
// available options:
// - JavaLibrary
// - GradlePlugin
// - AndroidLibrary
// - KotlinJvm
// - KotlinJs
// - KotlinMultiplatform
// the first parameter configures the javadoc jar, available options:
// - None
// - Empty
// - Javadoc
// - Dokka("dokkaHtml") - the parameter is the name of the Dokka task
// second one is for whether to publish sources, optional, defaults to true (not supported for KotlinMultiplatform(
// AndroidLibrary has a third parameter for which variant to publish, defaults to "release"
configure(new JavaLibrary(new JavadocJar.Javadoc(), true))
}


def releaseBuild = project.hasProperty('stable')


}

}
}

// coveralls setup
apply plugin: "jacoco"
apply plugin: "com.github.kt3k.coveralls"

def publishedProjects = subprojects.findAll {
it.name != 'crnk-documentation' && it.name != 'crnk-ui' && it.name != 'crnk-test' && !it.name.contains('example')
}

task jacocoMerge(type: JacocoMerge) {
destinationFile = new File(project.buildDir, 'jacoco/test.exec')
doFirst {
executionData = files(executionData.findAll { it.exists() })
}
for (publishedProject in publishedProjects) {
dependsOn publishedProject.path + ":check"
}
}


task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
description = 'Generates an aggregate report from all subprojects'

dependsOn tasks.jacocoMerge

executionData tasks.jacocoMerge.destinationFile

reports {
html.enabled = true // human readable
xml.enabled = true // required by coveralls
}

}


coveralls {
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
}

tasks.coveralls {
group = 'Coverage reports'
description = 'Uploads the aggregated coverage report to Coveralls'

dependsOn jacocoRootReport
//
// // TODO gradle publishing to maven central?
// if (!docs && !examples && !testProject && !legacyBraveProject) {
// apply plugin: "jacoco"
// jacoco {
// toolVersion = "0.8.10"
// }
//
// // rootProject.tasks.jacocoMerge.executionData tasks.withType(Test)
// rootProject.tasks.jacocoRootReport.additionalSourceDirs files(sourceSets.main.allSource.srcDirs)
//
// def sourceDirs = rootProject.tasks.jacocoRootReport.sourceDirectories
// def classDirs = rootProject.tasks.jacocoRootReport.classDirectories
//
// def mainOutput = files(files(sourceSets.main.output).collect {
// fileTree(dir: it, exclude: '**/legacy/**')
// })
//
// rootProject.tasks.jacocoRootReport.sourceDirectories.from files(sourceSets.main.allSource.srcDirs)
// rootProject.tasks.jacocoRootReport.classDirectories.from mainOutput
//
// rootProject.coveralls.sourceDirs.addAll(sourceSets.main.allSource.srcDirs.flatten())
//
// jacocoTestReport {
// reports {
// xml.enabled = true // coveralls plugin depends on xml format report
// html.enabled = true
// }
// }
// }
//
// apply plugin: 'maven-publish'
//
// if (!docs && !examples) {
//
// task sourcesJar(type: Jar) {
// from sourceSets.main.allSource
// classifier = 'sources'
// }
//
// task javadocJar(type: Jar, dependsOn: 'javadoc') {
// from javadoc.destinationDir
// classifier = 'javadoc'
// }
//
//
// plugins.withId("com.vanniktech.maven.publish.base") {
// group = GROUP_ID
//
// mavenPublishing {
// publishToMavenCentral("DEFAULT")
//
// // Will only apply to non snapshot builds.
// // Uses credentials as described above, supports both regular and in memory signing.
// signAllPublications()
//
// pom {
// name = "Crnk"
// description = "A description of what my library does."
// inceptionYear = "2020"
// url = "https ://github.com/crnk-project/crnk-framework/"
// licenses {
// license {
// name = "The Apache License, Version 2.0"
// url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
// distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
// }
// }
// developers {
// developer {
// id = "crnk"
// name = "crnk"
// url = "https://github.com/crnk-project/"
// }
// }
// scm {
// url = "https://github.com/crnk-project/crnk-framework"
// connection = "scm:git:git://github.com/crnk-project/crnk-framework.git"
// developerConnection = "scm:git:ssh://git@github.com/crnk-project/crnk-framework.git"
// }
// }
// }
// }
//
// apply plugin: "com.vanniktech.maven.publish.base"
//
// mavenPublishing {
// // available options:
// // - JavaLibrary
// // - GradlePlugin
// // - AndroidLibrary
// // - KotlinJvm
// // - KotlinJs
// // - KotlinMultiplatform
// // the first parameter configures the javadoc jar, available options:
// // - None
// // - Empty
// // - Javadoc
// // - Dokka("dokkaHtml") - the parameter is the name of the Dokka task
// // second one is for whether to publish sources, optional, defaults to true (not supported for KotlinMultiplatform(
// // AndroidLibrary has a third parameter for which variant to publish, defaults to "release"
// configure(new JavaLibrary(new JavadocJar.Javadoc(), true))
// }
//
//
// def releaseBuild = project.hasProperty('stable')
//
//
// }
//
// }
// }
//
// // coveralls setup
// apply plugin: "jacoco"
// apply plugin: "com.github.kt3k.coveralls"
//
// def publishedProjects = subprojects.findAll {
// it.name != 'crnk-documentation' && it.name != 'crnk-ui' && it.name != 'crnk-test' && !it.name.contains('example')
// }
////
//// task jacocoMerge(type: JacocoMerge) {
//// destinationFile = new File(project.buildDir, 'jacoco/test.exec')
//// doFirst {
//// executionData = files(executionData.findAll { it.exists() })
//// }
//// for (publishedProject in publishedProjects) {
//// dependsOn publishedProject.path + ":check"
//// }
//// }
//
//
// task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
// description = 'Generates an aggregate report from all subprojects'
//
//// dependsOn tasks.jacocoMerge
//
//// executionData tasks.jacocoMerge.destinationFile
//
//// reports {
//// html.enabled = true // human readable
//// xml.enabled = true // required by coveralls
//// }
//
// }
//
//
// coveralls {
// jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
// }
//
// tasks.coveralls {
// group = 'Coverage reports'
// description = 'Uploads the aggregated coverage report to Coveralls'
//
// dependsOn jacocoRootReport
}


Loading