diff --git a/build.gradle b/build.gradle index ff1bca4..b3cd2f0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,8 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.3.5' + id 'org.springframework.boot' version '3.3.5' apply(false) id 'io.spring.dependency-management' version '1.1.6' + id 'maven-publish' } group = 'org.yj' @@ -21,16 +22,35 @@ configurations { repositories { mavenCentral() + maven { url "https://jitpack.io" } +} + + +dependencyManagement { + imports { + mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES + } } dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - compileOnly 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' + implementation 'org.springframework.boot:spring-boot-starter-web:3.1.2' + compileOnly 'org.projectlombok:lombok:1.18.26' + annotationProcessor 'org.projectlombok:lombok:1.18.26' testImplementation 'org.springframework.boot:spring-boot-starter-test' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } + +publishing { + publications { + maven(MavenPublication) { + groupId = 'com.example.coreservice' + artifactId = 'core-service' + version = '0.2.4' + + from components.java + } + } +} tasks.named('test') { useJUnitPlatform() } diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..6e5ea31 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,11 @@ +jdk: + - openjdk21 + +before_install: + - sdk install java 21.0.1-zulu + - sdk use java 21.0.1-zulu + - sdk install maven + - mvn -v + +install: + - ./gradlew build publishToMavenLocal diff --git a/src/main/java/org/yj/sejongauth/Test.java b/src/main/java/org/yj/sejongauth/Test.java new file mode 100644 index 0000000..5d9d84e --- /dev/null +++ b/src/main/java/org/yj/sejongauth/Test.java @@ -0,0 +1,7 @@ +package org.yj.sejongauth; + +public class Test { + public static void Console(){ + System.out.println("test"); + } +} diff --git a/src/main/java/org/yj/sejongauth/config/AutoConfig.java b/src/main/java/org/yj/sejongauth/config/AutoConfig.java new file mode 100644 index 0000000..a590227 --- /dev/null +++ b/src/main/java/org/yj/sejongauth/config/AutoConfig.java @@ -0,0 +1,9 @@ +package org.yj.sejongauth.config; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ComponentScan("org.yj.sejongauth") +public class AutoConfig { +} diff --git a/src/main/resources/META_INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/src/main/resources/META_INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..500f400 --- /dev/null +++ b/src/main/resources/META_INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.example.coreservice.config.AutoConfig \ No newline at end of file