都运行成功,除了getaway模块

This commit is contained in:
陈云志
2020-12-18 13:28:13 +08:00
parent 467279cc19
commit b4d580ab79
34 changed files with 1588 additions and 162 deletions

View File

@@ -12,17 +12,7 @@ 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"
from "src/main/resources/appServer.conf"
from "src/main/resources/subGui.conf"
into "build/libs/"
}
task copySql(type: Copy) {
from "src/main/resources/sql"
into "build/libs/sql"
}
task cleanGridnt(type: Exec) {
executable "../rmGridntJar.sh"
}
@@ -60,27 +50,27 @@ dependencies {
}
jar {
// // 排除掉模块调试的资源文件, 启动类.
// excludes = ["file/WaveAnalysis", "com/gridnt/**/*Starter*", "logback*.xml",
// "application*.properties", "application*.yaml", "config"
// ]
// 排除掉模块调试的资源文件, 启动类.
excludes = []
manifest {
attributes "releaseVersion": version + "-" + getGitVersion()
attributes "vendor": "GRIDNT山东网聪信息科技有限公司"
attributes "buildTime": new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("GMT+08:00"))
}
}
apply plugin: "org.sonarqube"
sonarqube {
properties {
property "sonar.projectKey", "${project.name}"
property "sonar.projectName", "${project.name}"
property "sonar.sources", "src"
property "sonar.java.binaries", "build"
property "sonar.exclusions", "**/**test**/**"
property "sonar.sourceEncoding", "UTF-8"
}
}
//apply plugin: "org.sonarqube"
//sonarqube {
// properties {
// property "sonar.projectKey", "${project.name}"
// property "sonar.projectName", "${project.name}"
// property "sonar.sources", "src"
// property "sonar.java.binaries", "build"
// property "sonar.exclusions", "**/**test**/**"
// property "sonar.sourceEncoding", "UTF-8"
// }
//}

View File

@@ -1,11 +1,23 @@
//该产品的构建基本配置,公司统一模板,禁止开发人员开发过程中修改。
apply plugin: "org.springframework.boot"
archivesBaseName = "project-${project.name}"
// 清除现有的lib目录
task clearJar(type: Delete) {
delete "$buildDir\\libs\\lib"
}
task copyConfig(type: Copy) {
from "src/main/resources/bootstrap.yml"
into "$buildDir/libs/"
}
task copySql(type: Copy) {
from "src/main/resources/sql"
into "$buildDir/libs/sql"
}
// 将依赖包复制到lib目录
task copyJar(type: Copy, dependsOn: "clearJar") {
from configurations.compileClasspath
@@ -13,16 +25,17 @@ task copyJar(type: Copy, dependsOn: "clearJar") {
}
bootJar {
// excludes = ["file/WaveAnalysis", "*.jar", "*.properties", "*.yaml", "config", "*.conf"]
excludes = ["*.properties", "*.yaml", "config", "*.conf",
// "*.jar"
]
manifest {
attributes "Main-Class": "org.springframework.boot.loader.PropertiesLauncher"
attributes "Manifest-Release-Version": version + "-" + getGitVersion()
// attributes "Class-Path": configurations.runtime.files.collect { "../lib/$it.name" }.join(" ")
// attributes "Main-Class": "org.springframework.boot.loader.PropertiesLauncher"
// attributes "Class-Path": configurations.compileClasspath.files.collect { "../lib/$it.name" }.join(" ")
attributes "releaseVersion": version + "-" + getGitVersion()
attributes "vendor": "GRIDNT山东网聪信息科技有限公司"
attributes "buildTime": new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("GMT+08:00"))
}
// launchScript()
} dependsOn(clearJar, copyJar, copyConfig, copySql)
launchScript()
} dependsOn(copyConfig, copySql)

View File

@@ -1,46 +1,31 @@
apply plugin: "maven-publish"
group = "com.ruoyi"
archivesBaseName = "${project.name}"
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = "sources"
}
publishing {
publications {
maven(MavenPublication) {
artifactId "${archivesBaseName}"
version project.version
//如果是war包填写components.web如果是jar包填写components.java
from components.java
artifact sourcesJar
}
mavenJava(MavenPublication) {
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
}
publishing.publications {
mavenJava(MavenPublication) {
artifactId "${archivesBaseName}"
version project.version
//如果是war包填写components.web如果是jar包填写components.java
from components.java
artifact sourcesJar
}
}
repositories {
maven {
//指定要上传的maven私服仓库
def releasesRepoUrl = "http://192.168.8.200:8081/repository/releases"
def snapshotsRepoUrl = "http://192.168.8.200:8081/repository/snapshots/"
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
println "${group} ${archivesBaseName} publishing version is ${version}"
//认证用户和密码
credentials {
username "developer"
password "dev123"
}
publishing.repositories {
maven {
def releasesRepoUrl = "http://192.168.8.200:8081/repository/releases"
def snapshotsRepoUrl = "http://192.168.8.200:8081/repository/snapshots/"
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
println "${group} ${archivesBaseName} publishing version is ${version}"
credentials {
username "developer"
password "dev123"
}
}
}

View File

@@ -6,6 +6,7 @@ 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/runtime group: /runtime /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'