mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
分布式开发,每个模块一个gradle项目
This commit is contained in:
@@ -6,6 +6,12 @@ ext {
|
||||
logbackVersion = "1.2.3"
|
||||
}
|
||||
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "idea"
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
|
||||
task copyConfig(type: Copy) {
|
||||
from "src/main/resources/application.properties"
|
||||
from "src/main/resources/application.yaml"
|
||||
@@ -23,6 +29,7 @@ task cleanGridnt(type: Exec) {
|
||||
clean {
|
||||
delete = ["build", "out", "dist_java", "boot", "log", "logs",]
|
||||
}
|
||||
|
||||
[compileJava, compileTestJava]*.options*.encoding = "UTF-8"
|
||||
[compileJava, compileTestJava]*.sourceCompatibility = "11"
|
||||
[compileJava, compileTestJava]*.targetCompatibility = "11"
|
||||
@@ -31,7 +38,7 @@ repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url "https://maven.aliyun.com/repository/public/" }
|
||||
// maven { url "http://192.168.8.200:8081/repository/public/" }
|
||||
maven { url "http://192.168.8.200:8081/repository/public/" }
|
||||
}
|
||||
configurations.all {
|
||||
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
|
||||
@@ -53,14 +60,13 @@ dependencies {
|
||||
}
|
||||
|
||||
jar {
|
||||
// // 排除掉模块调试的资源文件, 启动类.
|
||||
// excludes = ["file/WaveAnalysis", "com/gridnt/**/*Starter*", "logback*.xml",
|
||||
// "application*.properties", "application*.yaml", "config"
|
||||
// ]
|
||||
// // 排除掉模块调试的资源文件, 启动类.
|
||||
// excludes = ["file/WaveAnalysis", "com/gridnt/**/*Starter*", "logback*.xml",
|
||||
// "application*.properties", "application*.yaml", "config"
|
||||
// ]
|
||||
manifest {
|
||||
attributes "releaseVersion": version + "-" + getGitVersion()
|
||||
attributes "vendor": "GRIDNT山东网聪信息科技有限公司 build"
|
||||
attributes "description": "重新编译打包,引用的其它组织的代码,著作圈原作者所有"
|
||||
attributes "vendor": "GRIDNT山东网聪信息科技有限公司"
|
||||
attributes "buildTime": new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("GMT+08:00"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
apply plugin: "maven-publish"
|
||||
group = "com.ruoyi"
|
||||
archivesBaseName = "${project.name}"
|
||||
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allJava
|
||||
|
||||
12
build-config/formart.sh
Executable file
12
build-config/formart.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
## 格式化 jar 引用
|
||||
|
||||
find . -name "build.gradle" | xargs sed -r -i "s/'/\"/g"
|
||||
find . -name "build.gradle" | xargs sed -r -i 's/compile group: /compile /g'
|
||||
find . -name "build.gradle" | xargs sed -r -i 's/compileOnly group: /compileOnly /g'
|
||||
find . -name "build.gradle" | xargs sed -r -i 's/implementation group: /implementation /g'
|
||||
find . -name "build.gradle" | xargs sed -r -i 's/testRuntime group: /testRuntime /g'
|
||||
find . -name "build.gradle" | xargs sed -r -i 's/testImplementation group: /testImplementation /g'
|
||||
find . -name "build.gradle" | xargs sed -r -i 's/", name: "|", version: "/:/g'
|
||||
|
||||
@@ -3,5 +3,4 @@
|
||||
# 使用方法: ./publish.sh 版本号.
|
||||
# git pull; git add . ;git commit -m " 发布版本 $*" ; git push
|
||||
|
||||
gradle --daemon --parallel -DbuildProduct=true clean publish -DreleaseVersion=$1
|
||||
|
||||
gradle --daemon --parallel -DbuildProduct=true clean publish -DreleaseVersion=$1
|
||||
Reference in New Issue
Block a user