代码拉取完成,页面将自动刷新
import java.time.LocalDateTime
buildscript {
repositories {
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
}
plugins {
id "io.freefair.lombok" version "6.5.1"
id "org.springframework.boot" version "3.1.1"
id "com.github.hierynomus.license" version "0.16.1"
id "io.spring.dependency-management" version "1.1.0"
}
allprojects {
group = 'com.opcooc'
version = project.opcoocVersion
}
description = "opcooc-storage-spring-boot-starter - 简单对象存储客户端驱动程序"
apply plugin: 'signing'
//apply plugin: 'checkstyle'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: "io.freefair.lombok"
apply plugin: 'org.springframework.boot'
apply plugin: "io.spring.dependency-management"
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
//checkstyle {
// configFile = file("style/checkstyle.xml") //指定checkstyle配置文件
// toolVersion = "8.37" //指定checkstyle工具的版本,部分style规则有版本要求
//
// //有警告时是否允许构建继续进行.
// ignoreFailures = false
//
// //是否在控制台上显示违反规则.
// showViolations = true
//}
tasks.withType(JavaCompile) {
options.encoding = project.encoding
options.warnings = false
options.deprecation = true
options.compilerArgs += ["-parameters"]
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
jar {
afterEvaluate {
manifest {
attributes 'Implementation-Title': archiveBaseName
attributes 'Implementation-Version': archiveVersion
attributes 'Built-Gradle': gradle.gradleVersion
attributes 'Bundle-DocURL': 'https://github.com/opcooc/opcooc-storage-spring-boot-starter'
attributes 'Build-OS': System.getProperty("os.name")
attributes 'Built-By': System.getProperty("user.name")
attributes 'Build-Jdk': System.getProperty("java.version")
attributes 'Build-Timestamp': LocalDateTime.now().format("yyyy-MM-dd HH:mm:ss")
}
}
archiveClassifier = ''
}
license {
encoding = project.encoding
header = rootProject.file("license.txt")
includes(["**/*.java"])
exclude "**/test/**/*.java"
exclude "**/*Test.java"
mapping "java", "SLASHSTAR_STYLE"
ignoreFailures = true
}
repositories {
mavenLocal()
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
api 'com.amazonaws:aws-java-sdk-s3:1.12.495'
api "org.springframework.boot:spring-boot-autoconfigure"
annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor"
implementation "org.springframework.boot:spring-boot-autoconfigure-processor"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
implementation "org.springframework.boot:spring-boot-configuration-processor"
implementation "org.springframework.boot:spring-boot-starter-aop"
implementation "org.springframework.boot:spring-boot-starter-web"
// checkstyle 'com.thomasjensen.checkstyle.addons:checkstyle-addons:7.0.1'
implementation 'org.slf4j:slf4j-api:2.0.6'
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
afterEvaluate {
configure(options) {
encoding project.encoding
charSet project.encoding
author true
version true
failOnError false
links "https://docs.oracle.com/javase/17/docs/api"
}
}
}
test {
dependsOn("cleanTest", "generatePomFileForMavenJavaPublication")
useJUnitPlatform()
exclude("**/storage/**")
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
}
tasks.whenTaskAdded { task ->
if (task.name.contains('signMavenJavaPublication')) {
task.enabled = new File(project.property('signing.secretKeyRingFile') as String).isFile()
}
}
publishing {
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.sonatypeUsername
password project.sonatypePassword
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = "opcooc-storage-spring-boot-starter"
packaging 'jar'
description = 'opcooc-storage-spring-boot-starter simple object storage client driver'
url = 'https://github.com/opcooc/opcooc-storage-spring-boot-starter'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'opcooc'
name = 'shenqicheng'
email = '1317225796@qq.com'
}
}
scm {
url = 'https://github.com/opcooc/opcooc-storage-spring-boot-starter'
connection = 'scm:git:https://github.com/opcooc/opcooc-storage-spring-boot-starter'
developerConnection = 'scm:git:git@github.com:opcooc/opcooc-storage-spring-boot-starter.git'
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。