diff --git a/.fleet/run.json b/.fleet/run.json new file mode 100644 index 00000000..1f631a49 --- /dev/null +++ b/.fleet/run.json @@ -0,0 +1,32 @@ +{ + "configurations": [ + { + "name": "OpenID-Federation [:server:build]", + "type": "gradle", + "workingDir": "$PROJECT_DIR$", + "tasks": [ + ":server:build" + ], + "args": [ + "" + ], + "initScripts": { + "flmapper": "ext.mapPath = { path -> null }" + } + }, + { + "name": "OpenID-Federation [build]", + "type": "gradle", + "workingDir": "$PROJECT_DIR$", + "tasks": [ + "build" + ], + "args": [ + "" + ], + "initScripts": { + "flmapper": "ext.mapPath = { path -> null }" + } + } + ] +} \ No newline at end of file diff --git a/.fleet/settings.json b/.fleet/settings.json new file mode 100644 index 00000000..9c37f817 --- /dev/null +++ b/.fleet/settings.json @@ -0,0 +1,12 @@ +{ + "plugins": [ + { + "type": "add", + "pluginName": "fleet.spring.boot" + }, + { + "type": "add", + "pluginName": "fleet.mercury" + } + ] +} \ No newline at end of file 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/admin-server/src/main/kotlin/com/sphereon/oid/fed/Application.kt b/admin-server/src/main/kotlin/com/sphereon/oid/fed/Application.kt new file mode 100644 index 00000000..2d2fe659 --- /dev/null +++ b/admin-server/src/main/kotlin/com/sphereon/oid/fed/Application.kt @@ -0,0 +1,11 @@ +package com.sphereon.oid.fed + +import org.springframework.boot.autoconfigure.SpringBootApplication +import org.springframework.boot.runApplication + +@SpringBootApplication +class Application + +fun main(args: Array) { + runApplication(*args) +} \ No newline at end of file diff --git a/admin-server/src/main/resources/application.properties b/admin-server/src/main/resources/application.properties new file mode 100644 index 00000000..79c568ef --- /dev/null +++ b/admin-server/src/main/resources/application.properties @@ -0,0 +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/build.gradle.kts b/build.gradle.kts index ec93b697..239576aa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,4 +7,7 @@ plugins { alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.kotlinJvm) apply false alias(libs.plugins.kotlinMultiplatform) apply false + alias(libs.plugins.springboot) apply false + alias(libs.plugins.springDependencyManagement) apply false + alias(libs.plugins.kotlinPluginSpring) apply false } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4559b0da..76006ce9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,8 +14,8 @@ compose-plugin = "1.6.10" junit = "4.13.2" kotlin = "2.0.0" kotlinxSerializationJson = "1.7.0-RC" -ktor = "2.3.11" -logback = "1.5.6" +springboot = "3.3.1" +springDependencyManagement = "1.1.5" [libraries] kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } @@ -29,10 +29,11 @@ androidx-material = { group = "com.google.android.material", name = "material", androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" } 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" } -logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } -ktor-server-core = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor" } -ktor-server-netty = { module = "io.ktor:ktor-server-netty-jvm", version.ref = "ktor" } -ktor-server-tests = { module = "io.ktor:ktor-server-tests-jvm", version.ref = "ktor" } + +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" } @@ -40,5 +41,7 @@ androidLibrary = { id = "com.android.library", version.ref = "agp" } 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" } -ktor = { id = "io.ktor.plugin", version.ref = "ktor" } 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 = "springDependencyManagement" } +kotlinPluginSpring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index fbf00ad3..a7cd08e0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -29,3 +29,4 @@ dependencyResolutionManagement { } include(":modules:openid-federation-common") +include(":admin-server")