From 12bd9b675bad1b71343a033b78a7a26afe685621 Mon Sep 17 00:00:00 2001 From: Robert Mathew Date: Mon, 1 Jul 2024 14:49:49 +0530 Subject: [PATCH] chores: PR feedback --- .fleet/run.json | 20 ++++++--- admin-server/build.gradle.kts | 34 +++++++++++++++ .../com/sphereon/oid/fed/Application.kt | 0 .../src/main/resources/application.properties | 1 + gradle/libs.versions.toml | 11 +++-- server/build.gradle.kts | 42 ------------------- 6 files changed, 57 insertions(+), 51 deletions(-) create mode 100644 admin-server/build.gradle.kts rename {server => admin-server}/src/main/kotlin/com/sphereon/oid/fed/Application.kt (100%) rename {server => admin-server}/src/main/resources/application.properties (77%) delete mode 100644 server/build.gradle.kts diff --git a/.fleet/run.json b/.fleet/run.json index 2054655b..1f631a49 100644 --- a/.fleet/run.json +++ b/.fleet/run.json @@ -3,9 +3,13 @@ { "name": "OpenID-Federation [:server:build]", "type": "gradle", - "workingDir": "C:\\Users\\Robo\\Sphereon\\OpenID-Federation", - "tasks": [":server:build"], - "args": [""], + "workingDir": "$PROJECT_DIR$", + "tasks": [ + ":server:build" + ], + "args": [ + "" + ], "initScripts": { "flmapper": "ext.mapPath = { path -> null }" } @@ -13,9 +17,13 @@ { "name": "OpenID-Federation [build]", "type": "gradle", - "workingDir": "C:\\Users\\Robo\\Sphereon\\OpenID-Federation", - "tasks": ["build"], - "args": [""], + "workingDir": "$PROJECT_DIR$", + "tasks": [ + "build" + ], + "args": [ + "" + ], "initScripts": { "flmapper": "ext.mapPath = { path -> null }" } diff --git a/admin-server/build.gradle.kts b/admin-server/build.gradle.kts new file mode 100644 index 00000000..55d5a430 --- /dev/null +++ b/admin-server/build.gradle.kts @@ -0,0 +1,34 @@ +plugins { + alias(libs.plugins.springboot) + alias(libs.plugins.springDependencyManagement) + alias(libs.plugins.kotlinJvm) + alias(libs.plugins.kotlinPluginSpring) + application +} + +group = "com.sphereon.oid.fed" +version = "1.0.0" + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + +dependencies { + implementation(libs.springboot.actuator) + implementation(libs.springboot.web) + implementation(libs.kotlin.reflect) + + runtimeOnly(libs.springboot.devtools) +} + +kotlin { + compilerOptions { + freeCompilerArgs.addAll("-Xjsr305=strict") + } +} + +tasks.withType { + useJUnitPlatform() +} \ No newline at end of file diff --git a/server/src/main/kotlin/com/sphereon/oid/fed/Application.kt b/admin-server/src/main/kotlin/com/sphereon/oid/fed/Application.kt similarity index 100% rename from server/src/main/kotlin/com/sphereon/oid/fed/Application.kt rename to admin-server/src/main/kotlin/com/sphereon/oid/fed/Application.kt diff --git a/server/src/main/resources/application.properties b/admin-server/src/main/resources/application.properties similarity index 77% rename from server/src/main/resources/application.properties rename to admin-server/src/main/resources/application.properties index e83bf36f..79c568ef 100644 --- a/server/src/main/resources/application.properties +++ b/admin-server/src/main/resources/application.properties @@ -1,4 +1,5 @@ spring.application.name=OpenID Federation +# Mapping /actuator/health to /status management.endpoints.web.base-path=/ management.endpoints.web.path-mapping.health=status diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3db9123b..76006ce9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ junit = "4.13.2" kotlin = "2.0.0" kotlinxSerializationJson = "1.7.0-RC" springboot = "3.3.1" -spingDependencyManagement = "1.1.5" +springDependencyManagement = "1.1.5" [libraries] kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } @@ -30,6 +30,11 @@ androidx-constraintlayout = { group = "androidx.constraintlayout", name = "const androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } +kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect" } +springboot-actuator = { group = "org.springframework.boot", name = "spring-boot-starter-actuator" } +springboot-web = { group = "org.springframework.boot", name = "spring-boot-starter-web" } +springboot-devtools = { group = "org.springframework.boot", name = "spring-boot-devtools" } + [plugins] androidApplication = { id = "com.android.application", version.ref = "agp" } androidLibrary = { id = "com.android.library", version.ref = "agp" } @@ -37,6 +42,6 @@ jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } -springboot = { id = "org.springframework.boot", version.ref = "springboot"} -springDependencyManagement = { id = "io.spring.dependency-management", version.ref = "spingDependencyManagement"} +springboot = { id = "org.springframework.boot", version.ref = "springboot" } +springDependencyManagement = { id = "io.spring.dependency-management", version.ref = "springDependencyManagement" } kotlinPluginSpring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" } \ No newline at end of file diff --git a/server/build.gradle.kts b/server/build.gradle.kts deleted file mode 100644 index 62c99881..00000000 --- a/server/build.gradle.kts +++ /dev/null @@ -1,42 +0,0 @@ -plugins { - alias(libs.plugins.springboot) - alias(libs.plugins.springDependencyManagement) - alias(libs.plugins.kotlinJvm) - alias(libs.plugins.kotlinPluginSpring) - application -} - -group = "com.sphereon.oid.fed" -version = "1.0.0" - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -dependencies { - - implementation("org.springframework.boot:spring-boot-starter-actuator") - implementation("org.springframework.boot:spring-boot-starter-web") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("org.jetbrains.kotlin:kotlin-reflect") - - - testImplementation("org.springframework.boot:spring-boot-starter-test") - testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") - testRuntimeOnly("org.junit.platform:junit-platform-launcher") - - runtimeOnly("org.springframework.boot:spring-boot-devtools") - //testImplementation(libs.kotlin.test.junit) -} - -kotlin { - compilerOptions { - freeCompilerArgs.addAll("-Xjsr305=strict") - } -} - -tasks.withType { - useJUnitPlatform() -} \ No newline at end of file