Skip to content

Commit

Permalink
feat: fix deps & autoconfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
Citymonstret committed Dec 17, 2023
1 parent 4a87108 commit ccb8e2f
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The example module contains a Spring Boot application with a couple of commands.
```xml
<dependencies>
<dependency>
<groupId>org.incendo.cloud</groupId>
<groupId>cloud.commandframework</groupId>
<artifactId>cloud-spring</artifactId>
<version>1.0.0</version>
</dependency>
Expand Down
1 change: 0 additions & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies {
implementation(libs.spotless)
implementation(libs.indraCommon)
implementation(libs.gradleKotlinJvm)
implementation(libs.spring.plugin.depman)

implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
id("net.kyori.indra")
id("net.kyori.indra.checkstyle")
id("com.diffplug.spotless")
id("io.spring.dependency-management")
}

indra {
Expand Down Expand Up @@ -48,11 +47,6 @@ spotless {

// Common dependencies.
dependencies {
implementation(platform(libs.spring.shell.dependencies))

api(libs.spring.boot.autoconfigure)
api(libs.spring.shell)

compileOnlyApi(libs.checkerQual)
compileOnlyApi(libs.apiguardian)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
plugins {
id("net.kyori.indra.publishing")
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
}

indra {
github("Incendo", "cloud-spring") {
ci(true)
}
mitLicense()

configurePublications {
pom {
developers {
developer {
id.set("Sauilitired")
name.set("Alexander Söderberg")
email.set("[email protected]")
}
}
}
}
}
16 changes: 13 additions & 3 deletions cloud-spring/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import org.springframework.boot.gradle.tasks.bundling.BootJar

plugins {
id("cloud-spring.base-conventions")
id("cloud-spring.publishing-conventions")
alias(libs.plugins.spring.plugin.boot)
}
apply(plugin = "io.spring.dependency-management")

tasks.named<BootJar>("bootJar") {
enabled = false
}

dependencies {
api(libs.cloud.core)
compileOnlyApi(libs.cloud.annotations)
api(libs.spring.boot.autoconfigure)
api(libs.spring.shell)
api(platform(libs.spring.shell.dependencies))

compileOnly(libs.immutables)
annotationProcessor(libs.immutables)
compileOnlyApi(libs.cloud.annotations)

testImplementation(libs.spring.boot.starter.test)
}
6 changes: 0 additions & 6 deletions cloud-spring/src/main/resources/META-INF/spring.factories

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
org.incendo.cloud.spring.config.CloudSpringConfig
org.incendo.cloud.spring.SpringCommandManager
org.incendo.cloud.spring.registrar.BeanRegistrar
org.incendo.cloud.spring.registrar.AnnotationRegistrar
org.incendo.cloud.spring.registrar.CommandRegistrationCoordinator
org.incendo.cloud.spring.SpringCommandRegistrationHandler
1 change: 1 addition & 0 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id("cloud-spring.base-conventions")
alias(libs.plugins.spring.plugin.boot)
}
apply(plugin = "io.spring.dependency-management")

dependencies {
implementation(project(":cloud-spring"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* Example of a spring-shell application using cloud-spring.
*/
@SpringBootApplication(scanBasePackages = "org.incendo.cloud.spring")
@SpringBootApplication
public class ExampleApplication {

private static final Logger LOGGER = LoggerFactory.getLogger(ExampleApplication.class);
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=org.incendo
version=0.0.1
group=cloud.commandframework
version=1.0.0-SNAPSHOT
description=cloud-spring

org.gradle.caching=true
Expand Down
4 changes: 0 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ spring-plugin-boot = { id = "org.springframework.boot", version.ref = "springBoo

[versions]
springBoot = "3.1.6"
springDepman = "1.1.4"
spotless = "6.22.0"
ktlint = "1.0.1"
indra = "3.1.3"
Expand All @@ -13,7 +12,6 @@ kotlin = "1.9.20"

checkerQual = "3.40.0"
apiguardian = "1.1.2"
immutables = "2.9.2"
slf4j = "2.0.9"
cloud = "2.0.0-SNAPSHOT"

Expand All @@ -24,14 +22,12 @@ jupiter = "5.10.1"
truth = "1.1.4"

[libraries]
spring-plugin-depman = { group = "io.spring.dependency-management", name = "io.spring.dependency-management.gradle.plugin", version.ref = "springDepman" }
spotless = { group = "com.diffplug.spotless", name = "spotless-plugin-gradle", version.ref = "spotless" }
indraCommon = { group = "net.kyori", name = "indra-common", version.ref = "indra" }
gradleKotlinJvm = { group = "org.jetbrains.kotlin.jvm", name = "org.jetbrains.kotlin.jvm.gradle.plugin", version.ref = "kotlin" }

checkerQual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerQual" }
apiguardian = { group = "org.apiguardian", name = "apiguardian-api", version.ref = "apiguardian" }
immutables = { group = "org.immutables", name = "value", version.ref = "immutables" }
slf4j = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }

# Spring
Expand Down

0 comments on commit ccb8e2f

Please sign in to comment.