3 Star 0 Fork 0

闫鑫/思明城建1031

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 4.02 KB
一键复制 编辑 原始数据 按行查看 历史
闫鑫 提交于 2024-10-31 16:11 . 初始化提交
/**
* This is a kingdee cosmic template project that is automatically generated by the Kingdee cosmic development assistant plugin.
* If there are any issues during the use process, you can provide feedback to the kingdee developer community website.
* Website: https://developer.kingdee.com/developer?productLineId=29
* Author: liebin.zheng
* Generate Date: 2024-09-02 09:14:41
*/
plugins {
id 'java'
//https://docs.gradle.org/current/userguide/java_library_plugin.html#java_library_plugin
id 'java-library'
//id 'maven-publish'
//https://docs.gradle.org/current/userguide/idea_plugin.html
//id 'idea'
//https://docs.gradle.org/current/userguide/eclipse_plugin.html
//id 'eclipse'
//id "org.sonarqube" version "3.5.0.2730"
}
apply from: 'config.gradle'
def bos = ext.path.bos
def trd = ext.path.trd
def cus = ext.path.cus
def biz = ext.path.biz
def outputdir = ext.path.outputdir
//所有工程共用的配置
allprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
repositories{
mavenLocal()
maven{ url'https://maven.aliyun.com/repository/public/'}
maven{ url'https://maven.aliyun.com/repository/gradle-plugin'}
mavenCentral()
//maven { url 'https://repo.gradle.org/gradle/libs-releases' }
//gradlePluginPortal()
}
group = System.getProperty('groupId')
version = System.getProperty('version')
def jdk_version = System.getProperty('jdk.version')
sourceCompatibility = jdk_version
targetCompatibility = jdk_version
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
dependencies {
//implementation 'cn.hutool:hutool-all:5.8.20'
//implementation 'ch.qos.logback:logback-classic:1.2.12'
//implementation 'org.slf4j:log4j-over-slf4j:1.7.36'
//implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.20.0'
//testImplementation platform('org.junit:junit-bom:5.9.1')
//testImplementation 'org.junit.jupiter:junit-jupiter'
}
test {
useJUnitPlatform()
}
java {
withSourcesJar()
//withJavadocJar()
}
Date now = new Date()
String date = now.format('yyyy-MM-dd HH:mm:ss')
String buildNum = now.format('yyyyMMddHHmmssSSS')
String gitCommitShortHash = ''
String gitBranch = ''
try{
gitCommitShortHash = 'git log -1 --pretty=%H'.execute([], project.rootDir).text.trim()
gitBranch = 'git branch --show-current'.execute([], project.rootDir).text.trim()
} catch(Exception e){
println "warning: the commandline tools of git was not installed!"
}
jar {
manifest {
attributes 'Group-Name': project.group
attributes 'Project-Name': project.name
attributes 'Bundle-Version': project.version
attributes 'Build-Num': buildNum
attributes 'Build-Date': date
attributes 'Build-Jdk': System.getProperty('java.version')
attributes 'Built-By': 'Kingdee Cosmic Developer Tools'
attributes 'Build-Tool': 'Gradle ' + project.gradle.gradleVersion
attributes 'Git-Commit-Hash': gitCommitShortHash
attributes 'Git-Branch': gitBranch
attributes 'Cloud-Name': ''
attributes 'App-Name': ''
attributes 'Jar-Id': ''
attributes 'Build-Image': ''
}
}
}
//所有子工程共用的配置
subprojects {
dependencies {
}
//生成本工程jar包并拷贝到outputdir目录
task buildJar(type: Copy, dependsOn: build){
group 'build'
description '生成本工程jar包并拷贝到outputdir目录'
from 'build/libs'
into outputdir
exclude '*sources.jar','*javadoc.jar','*cosmic-debug*.jar'
processResources{
from('src/main/java'){
include '**/*.properties'
}
}
}
//生成本工程jar包并拷贝到拷贝到cus目录
task deployJar(type: Copy, dependsOn: build){
group 'build'
description '生成本工程jar包并拷贝到拷贝到cus目录'
from 'build/libs'
into cus
exclude '*sources.jar','*javadoc.jar','*cosmic-debug*.jar'
processResources{
from('src/main/java'){
include '**/*.properties'
}
}
}
test.ignoreFailures true
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yan-xin1299/siming-urban-construction-1031.git
git@gitee.com:yan-xin1299/siming-urban-construction-1031.git
yan-xin1299
siming-urban-construction-1031
思明城建1031
master

搜索帮助