v 5.0.8
This commit is contained in:
+37
-52
@@ -16,7 +16,7 @@
|
||||
* ProjectName mingli-utils
|
||||
* ModuleName mingli-utils
|
||||
* CurrentFile build.gradle.kts
|
||||
* LastUpdate 2026-02-08 03:14:06
|
||||
* LastUpdate 2026-03-10 09:16:54
|
||||
* UpdateUser MingLiPro
|
||||
*/
|
||||
|
||||
@@ -30,12 +30,15 @@ plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
kotlin("jvm") version "2.2.20"
|
||||
id("org.jetbrains.dokka") version "2.0.0"
|
||||
kotlin("kapt") version "2.2.20"
|
||||
id("org.jetbrains.dokka") version "2.1.0"
|
||||
id("org.jetbrains.dokka-javadoc") version "2.1.0"
|
||||
}
|
||||
val GROUPSID = project.properties["GROUPSID"] as String
|
||||
val VERSIONS = project.properties["VERSIONS"] as String
|
||||
val ARTIFACTID = project.properties["ARTIFACTID"] as String
|
||||
val JDKVERSIONS = (project.properties["JDKVERSIONS"] as String).toInt()
|
||||
|
||||
|
||||
group = GROUPSID
|
||||
version = VERSIONS
|
||||
@@ -46,50 +49,34 @@ base {
|
||||
|
||||
val buildDir: java.nio.file.Path = File("build").toPath()
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs("src/main/java")
|
||||
}
|
||||
kotlin {
|
||||
srcDirs("src/main/kotlin")
|
||||
}
|
||||
resources {
|
||||
srcDirs("src/main/resources")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
withSourcesJar()
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(JDKVERSIONS)
|
||||
}
|
||||
dependencies {
|
||||
|
||||
implementation("org.slf4j:slf4j-api:2.0.17")
|
||||
implementation("com.mingliqiye.utils.jna:WinKernel32Api:1.0.1")
|
||||
implementation(kotlin("reflect"))
|
||||
|
||||
compileOnly("org.mindrot:jbcrypt:0.4")
|
||||
|
||||
compileOnly("com.squareup.okhttp3:okhttp:5.3.2")
|
||||
compileOnly("com.fasterxml.jackson.core:jackson-databind:2.21.0")
|
||||
compileOnly("com.fasterxml.jackson.module:jackson-module-kotlin:2.21.0")
|
||||
compileOnly("org.springframework.boot:spring-boot-starter-web:2.7.18")
|
||||
compileOnly("org.springframework:spring-context:5.3.0")
|
||||
compileOnly("org.springframework.boot:spring-boot-autoconfigure:2.7.16")
|
||||
compileOnly("tools.jackson.core:jackson-databind:3.1.0")
|
||||
compileOnly(fileTree("libs"))
|
||||
compileOnly("com.google.code.gson:gson:2.13.2")
|
||||
compileOnly("org.mybatis:mybatis:3.5.19")
|
||||
compileOnly("io.netty:netty-all:4.1.130.Final")
|
||||
compileOnly("com.baomidou:mybatis-plus-core:3.5.15")
|
||||
compileOnly("net.java.dev.jna:jna:5.17.0")
|
||||
compileOnly("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.8")
|
||||
compileOnly("com.baomidou:mybatis-plus-extension:3.5.15")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
|
||||
// testImplementation("com.squareup.okhttp3:okhttp:5.3.2")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
testImplementation("com.mingliqiye.logger:logger-log4j2:1.0.5")
|
||||
testImplementation("com.google.code.gson:gson:2.13.2")
|
||||
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.21.0")
|
||||
@@ -97,14 +84,20 @@ dependencies {
|
||||
}
|
||||
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
tasks.named<Test>("test") {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
|
||||
tasks.withType<JavaExec>().configureEach {
|
||||
jvmArgs = listOf(
|
||||
"-Dfile.encoding=UTF-8", "-Dsun.stdout.encoding=UTF-8", "-Dsun.stderr.encoding=UTF-8"
|
||||
jvmArgs?.addAll(
|
||||
listOf(
|
||||
"-Dfile.encoding=UTF-8", "-Dsun.stdout.encoding=UTF-8", "-Dsun.stderr.encoding=UTF-8"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -149,24 +142,16 @@ tasks.withType<org.gradle.jvm.tasks.Jar> {
|
||||
}
|
||||
val isJdk8Build = project.findProperty("buildForJdk8") == "true"
|
||||
|
||||
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://maven.aliyun.com/repository/public/")
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
tasks.register<Jar>("javaDocJar") {
|
||||
group = "build"
|
||||
archiveClassifier.set("javadoc")
|
||||
dependsOn("dokkaJavadoc")
|
||||
archiveClassifier.set("javadoc-dec")
|
||||
dependsOn("dokkaGeneratePublicationJavadoc")
|
||||
from(buildDir.resolve("dokka/javadoc"))
|
||||
}
|
||||
tasks.register<Jar>("kotlinDocJar") {
|
||||
group = "build"
|
||||
archiveClassifier.set("kotlindoc")
|
||||
dependsOn("dokkaHtml")
|
||||
archiveClassifier.set("javadoc")
|
||||
dependsOn("dokkaGeneratePublicationHtml")
|
||||
from(buildDir.resolve("dokka/html"))
|
||||
}
|
||||
publishing {
|
||||
@@ -175,18 +160,12 @@ publishing {
|
||||
name = "MavenRepositoryRaw"
|
||||
url = uri("C:/data/git/maven-repository-raw")
|
||||
}
|
||||
maven {
|
||||
name = "OSSRepository"
|
||||
url = uri("C:/data/git/maven-repository-raw-utils")
|
||||
}
|
||||
}
|
||||
publications {
|
||||
create<MavenPublication>("mavenJava") {
|
||||
from(components["java"])
|
||||
artifact(tasks.named("javaDocJar"))
|
||||
artifact(tasks.named("kotlinDocJar"))
|
||||
artifactId = ARTIFACTID
|
||||
java.toolchain.languageVersion.set(JavaLanguageVersion.of(8))
|
||||
pom {
|
||||
name = "mingli-utils"
|
||||
url = "https://mingli-utils.mingliqiye.com"
|
||||
@@ -222,8 +201,6 @@ tasks.build {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
tasks.processResources {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
outputs.upToDateWhen { false }
|
||||
@@ -239,3 +216,11 @@ tasks.processResources {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
val secretKeyRingFile = System.getenv("SIGNING_SECRET_KEY_RING_FILE")
|
||||
val keyId = System.getenv("SIGNING_KEY_ID")
|
||||
project.ext.set("signing.secretKeyRingFile", secretKeyRingFile)
|
||||
project.ext.set("signing.keyId", keyId)
|
||||
project.ext.set("signing.password", "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user