import java.net.URI plugins { id("java") } val artefactVersion: String by project val projectUrl: String by project val projectGithubUrl: String by project val licenseName: String by project val licenseUrl: String by project val jacksonVersion: String by project val springBootVersion: String by project group = "com.onixbyte" version = artefactVersion repositories { mavenCentral() } dependencies { implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") implementation("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion") implementation("org.springframework.boot:spring-boot-starter-logging:$springBootVersion") implementation("org.springframework.boot:spring-boot-configuration-processor:$springBootVersion") implementation("org.springframework.boot:spring-boot-starter-data-redis:$springBootVersion") annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:$springBootVersion") testImplementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion") testImplementation(platform("org.junit:junit-bom:5.10.0")) testImplementation("org.junit.jupiter:junit-jupiter") } java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 withSourcesJar() withJavadocJar() } tasks.test { useJUnitPlatform() } publishing { publications { create("simpleSerialSpringBootStarter") { groupId = group.toString() artifactId = "simple-serial-spring-boot-starter" version = artefactVersion pom { name = "Simple Serial :: Spring Boot Starter" description = "A Redis based easy-to-use serial service." url = projectUrl licenses { license { name = licenseName url = licenseUrl } } scm { connection = "scm:git:git://github.com:OnixByte/JDevKit.git" developerConnection = "scm:git:git://github.com:OnixByte/JDevKit.git" url = projectGithubUrl } developers { developer { id = "zihluwang" name = "Zihlu Wang" email = "really@zihlu.wang" timezone = "Asia/Hong_Kong" } } } from(components["java"]) signing { sign(publishing.publications["simpleSerialSpringBootStarter"]) } } repositories { maven { name = "sonatypeNexus" url = URI(providers.gradleProperty("repo.maven-central.host").get()) credentials { username = providers.gradleProperty("repo.maven-central.username").get() password = providers.gradleProperty("repo.maven-central.password").get() } } } } }