代码拉取完成,页面将自动刷新
同步操作将从 这么难演/doudada-components 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// 编译脚本
buildscript {
ext {
depVersion = [
springBoot: "2.6.11",
lombok : "1.18.24",
junit : "5.9.0"
]
}
// 仓库配置
repositories {
mavenCentral()
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://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${depVersion.springBoot}")
}
}
allprojects {
group "cool.doudou"
version "1.0.0-SNAPSHOT"
}
// 子模块配置
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'io.spring.dependency-management'
// 仓库配置
repositories {
mavenLocal()
mavenCentral()
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://oss.sonatype.org/content/repositories/snapshots/" }
}
configurations {
all*.exclude group: "spring-boot-starter-logging"
all*.exclude module: "spring-boot-starter-tomcat"
}
// 依赖管理
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${depVersion.springBoot}"
}
}
dependencies {
// log4j2
compileOnly "org.springframework.boot:spring-boot-starter-log4j2"
// lombok
compileOnly "org.projectlombok:lombok:${depVersion.lombok}"
annotationProcessor "org.projectlombok:lombok:${depVersion.lombok}"
// junit
testImplementation "org.junit.jupiter:junit-jupiter:${depVersion.junit}"
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc
classifier = 'javadoc'
}
// 解决javadoc打包乱码
javadoc {
options.encoding = "UTF-8"
options.charSet = "UTF-8"
options.author = true
options.version = true
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.name
version "${version}"
// components.java jar包 || components.auth war包
from components.java
artifact sourcesJar
artifact javadocJar
// 添加 pom 相关信息
// https://docs.gradle.org/current/dsl/org.gradle.api.publish.maven.MavenPublication.html
pom {
name = "doudada-components"
description = "豆搭搭 组件库"
url = "https://gitee.com/celery-doudou/doudada-components"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "jiangcs"
name = "这么诚实"
email = "jiangchengshi@gmail.com"
}
}
// 版本控制仓库地址
scm {
url = 'https://gitee.com/celery-doudou/doudada-components.git'
// 用于发布的链接
connection = 'scm:git:https://gitee.com/celery-doudou/doudada-components.git'
// 用于指定开发者
developerConnection = 'scm:git:https://gitee.com/celery-doudou/doudada-components.git'
}
}
}
}
repositories {
maven {
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 = sonatypeUsername
password = sonatypePassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。