代码拉取完成,页面将自动刷新
apply plugin: 'java-library'
apply plugin: 'maven-publish'
//apply plugin: 'signing'
ext {
configuration = [
javaVersion = JavaVersion.VERSION_17
]
libraries = [
springBootVersion = "3.3.0",
lombokVersion = "1.18.26",
]
}
group = 'com.aizuda'
version = '1.0.0'
description = "aizuda toolkit."
sourceCompatibility = "${javaVersion}"
targetCompatibility = "${javaVersion}"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/spring' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://repo.spring.io/release' }
maven { url 'https://repo.spring.io/milestone' }
mavenCentral()
}
dependencies {
compileOnly("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
compileOnly("com.baomidou:kisso:3.9.1")
compileOnly("org.bouncycastle:bcprov-jdk15on:1.70")
testImplementation("com.baomidou:kisso:3.9.1")
testImplementation("org.bouncycastle:bcprov-jdk15on:1.70")
compileOnly("org.projectlombok:lombok:${lombokVersion}")
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}")
testCompileOnly("org.projectlombok:lombok:${lombokVersion}")
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
//javadoc {
// options {
// encoding "UTF-8"
// charSet 'UTF-8'
// author true
// version true
// failOnError false
// links "http://docs.oracle.com/javase/7/docs/api"
// }
//}
//
//task javadocJar(type: Jar, dependsOn: javadoc) {
// archiveClassifier = 'javadoc'
// from 'build/docs/javadoc'
//}
artifacts {
archives sourcesJar
// archives javadocJar
}
publishing {
repositories {
maven {
def userName = System.getProperty("un")
def passWord = System.getProperty("ps")
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username userName
password passWord
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
// artifact javadocJar
pom {
name = 'aizuda-toolkit'
packaging 'jar'
description = 'Aizuda toolkit.'
url = 'https://gitee.com/aizuda/aizuda-toolkit'
scm {
connection = 'scm:git@github.com:Codearte/gradle-nexus-staging-plugin.git'
developerConnection = 'scm:git@github.com:Codearte/gradle-nexus-staging-plugin.git'
url = 'https://gitee.com/aizuda/aizuda-toolkit'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'aizuda'
name = '青苗'
email = 'jobob@qq.com'
}
}
withXml {
def root = asNode()
root.dependencies.'*'.findAll {
def d = it
d.scope.text() == 'runtime' && project.configurations.findByName("implementation").allDependencies.find { dep ->
dep.name == it.artifactId.text()
}.each() {
d.scope*.value = 'compile'
d.appendNode('optional', true)
}
}
}
}
}
}
// signing {
// sign publishing.publications.mavenJava
// }
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。