1 Star 0 Fork 98

gaobug / aizuda-components

forked from aizuda / aizuda-components 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 6.24 KB
一键复制 编辑 原始数据 按行查看 历史
青苗 提交于 2022-04-27 14:21 . 新增poi-tl相关辅助处理类
// 编译脚本
buildscript {
ext {
// https://start.spring.io/actuator/info
springBootVersion = "2.6.6"
}
// 仓库配置
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' }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
description = "爱组搭低代码组件化开发平台"
// 项目配置
allprojects {
group "com.aizuda"
}
// 子模块配置
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
// apply plugin: 'signing'
apply plugin: "io.spring.dependency-management"
// 仓库配置
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' }
maven { url 'https://repo.spring.io/snapshot' }
}
// 依赖管理
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
}
dependencies {
// 单点登录
dependency("com.baomidou:kisso:3.8.0")
dependency("org.aspectj:aspectjweaver:1.9.8")
// 工具类
dependency("com.aizuda:aizuda-toolkit:0.0.1")
// http://deepoove.com/poi-tl/
dependency("com.deepoove:poi-tl:1.12.0")
// 监控
dependency("com.github.oshi:oshi-core:6.1.4")
}
}
// 依赖配置
dependencies {
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testAnnotationProcessor("org.projectlombok:lombok")
testCompileOnly("org.projectlombok:lombok")
compileOnly("org.aspectj:aspectjweaver")
testImplementation("org.aspectj:aspectjweaver")
compileOnly("javax.servlet:javax.servlet-api")
testImplementation("javax.servlet:javax.servlet-api")
// 编译测试
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("javax.servlet:javax.servlet-api")
}
// 编译环境 JDK1.8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.warnings = false
options.deprecation = true
options.compilerArgs += ["-parameters"]
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
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) {
// 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 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-components'
packaging 'jar'
description = 'aizuda components.'
url = 'https://github.com/aizuda/aizuda-components'
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://github.com/aizuda/aizuda-components'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://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
// }
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huangzhiquan/aizuda-components.git
git@gitee.com:huangzhiquan/aizuda-components.git
huangzhiquan
aizuda-components
aizuda-components
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891