Skip to content

Commit

Permalink
support for fat jar in sdk impl
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Nov 22, 2023
1 parent 6af3009 commit 4b6e1f5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
8 changes: 6 additions & 2 deletions midpoint-sdk-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("java")
id("java-library")
}

group = "com.evolveum.midpoint.sdk"
Expand All @@ -10,15 +10,19 @@ repositories {
}

dependencies {
api(libs.midpoint.schema) {
because("For prism and schema related features")
}
implementation(libs.midpoint.common) {
isTransitive = false
because("Needed because of LocalizationService interface") // todo move LocalizationService interface somewhere maybe?
because("Needed only because of LocalizationService interface") // todo move LocalizationService interface somewhere maybe?
}
runtimeOnly(libs.midpoint.localization) {
because("For LocalizationServiceImpl")
}

implementation(libs.slf4j.api)
implementation(libs.spring.boot.loader)
}

tasks.test {
Expand Down
20 changes: 17 additions & 3 deletions midpoint-sdk-impl/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import org.springframework.boot.gradle.tasks.bundling.BootJar

fun properties(key: String) = project.findProperty(key).toString()

plugins {
id("java-library")
id("org.springframework.boot") version "3.1.5"
}

group = "com.evolveum.midpoint.sdk"
Expand All @@ -12,12 +15,11 @@ dependencies {

implementation(libs.prism.utils)

implementation(libs.midpoint.schema)

implementation(libs.midpoint.common) {
isTransitive = false
}
implementation(libs.midpoint.schema) {
isTransitive = false
}
implementation(libs.midpoint.model.common) {
isTransitive = false
}
Expand All @@ -35,8 +37,20 @@ dependencies {
}

implementation(libs.commons.lang)

testImplementation(testLibs.jupiter.api)
testRuntimeOnly(testLibs.jupiter.engine)
}

tasks.getByName<Test>("test") {
useJUnitPlatform()
}

tasks.getByName<BootJar>("bootJar") {
archiveClassifier.set("all")
mainClass.set("NonExistingClass")
}

tasks.getByName<Jar>("jar") {
archiveClassifier.set("")
}
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dependencyResolutionManagement {
version("okhttp", "4.10.0")
version("openkeepass", "0.8.1")
version("spring", "5.3.8")
version("spring-boot", "3.1.5")
version("stax", "1.2.0")
version("testng", "6.14.3")
version("slf4j", "1.7.32")
Expand Down Expand Up @@ -58,6 +59,7 @@ dependencyResolutionManagement {
library("openkeepass", "de.slackspace", "openkeepass").versionRef("openkeepass")

library("spring-core", "org.springframework", "spring-core").versionRef("spring")
library("spring-boot-loader", "org.springframework.boot", "spring-boot-loader").versionRef("spring-boot")
library("stax", "stax", "stax").versionRef("stax")
library("slf4j-api", "org.slf4j", "slf4j-api").versionRef("slf4j")
library("velocity", "org.apache.velocity", "velocity-engine-core").versionRef("velocity")
Expand Down

0 comments on commit 4b6e1f5

Please sign in to comment.