Skip to content
Open
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
40 changes: 37 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ buildscript {
dependencies {
classpath "se.bjurr.gradle.java-convention:se.bjurr.gradle.java-convention.gradle.plugin:0.+"
classpath "org.wiremock.tools.gradle:gradle-wiremock-extension-plugins:0.4.0"
classpath "com.github.johnrengelman:shadow:8.1.1"
}
}

apply plugin: "project-report"
apply plugin: "se.bjurr.gradle.java-convention"
apply plugin: "com.github.johnrengelman.shadow"

// Or else it will be 11 in wiremock-extension-convention
sourceCompatibility = 17
targetCompatibility = 17
apply plugin: "org.wiremock.tools.gradle.wiremock-extension-convention"


group 'org.wiremock.integrations'

jar {
Expand Down Expand Up @@ -69,9 +70,42 @@ dependencies {
}
}

// Not using shadowJar, but currently not possible to disable in wiremock-extension-convention
shadowJar {
archiveBaseName.set('wiremock-spring-boot-standalone')
archiveClassifier.set('')
configurations = [
project.configurations.runtimeClasspath,
project.configurations.standaloneOnly
]
relocate "org.wiremock", 'wiremock.org.wiremock'
relocate "org", 'wiremock.org'
relocate "com.google", 'wiremock.com'
relocate "net.minidev", 'wiremock.net'
relocate "jakarta.servlet", "wiremock.jakarta"
relocate "joptsimple", "wiremock.joptsimple"
exclude 'joptsimple/HelpFormatterMessages.properties'

mergeServiceFiles()

exclude '**/*'
exclude 'META-INF/maven/**'
exclude 'META-INF/versions/17/**'
exclude 'META-INF/versions/21/**'
exclude 'META-INF/versions/22/**'
exclude 'module-info.class'
exclude 'handlebars-*.js'
}

publishing {
getComponents().withType(AdhocComponentWithVariants).each { c ->
c.withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
publications {
standaloneJar(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
}
assemble.dependsOn shadowJar
test.dependsOn shadowJar
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ githubRepo=wiremock-spring-boot
developer.id=tomasbjerre
developer.name=Tomas Bjerre
developer.email=tomas.bjerre85@gmail.com
useShadowJar=false
Loading