feat: update build script
This commit is contained in:
15
build.gradle
15
build.gradle
@@ -7,9 +7,6 @@ def buildJSON = JsonSlurper.newInstance().parseText(new File("build.json").text)
|
|||||||
def baseProjectName = buildJSON?.project?.name ?: '__project_name__';
|
def baseProjectName = buildJSON?.project?.name ?: '__project_name__';
|
||||||
def jarManifestMainClass = buildJSON?.project?.main ?: 'SampleMain'
|
def jarManifestMainClass = buildJSON?.project?.main ?: 'SampleMain'
|
||||||
|
|
||||||
if (buildJSON.application) {
|
|
||||||
mainClassName = jarManifestMainClass
|
|
||||||
}
|
|
||||||
archivesBaseName = buildJSON?.project?.archiveName ?: baseProjectName
|
archivesBaseName = buildJSON?.project?.archiveName ?: baseProjectName
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
@@ -32,18 +29,6 @@ tasks.withType(JavaCompile) {
|
|||||||
// '-x test' skip unit test
|
// '-x test' skip unit test
|
||||||
defaultTasks 'build'
|
defaultTasks 'build'
|
||||||
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
maven() { url 'https://maven.aliyun.com/repository/central' }
|
|
||||||
mavenCentral()
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.11.RELEASE")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Main-Class': jarManifestMainClass
|
attributes 'Main-Class': jarManifestMainClass
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
"main": "me.hatter.tools.secureeditor.Main",
|
"main": "me.hatter.tools.secureeditor.Main",
|
||||||
"archiveName": "secure-editor"
|
"archiveName": "secure-editor"
|
||||||
},
|
},
|
||||||
"application": false,
|
|
||||||
"java": "1.8",
|
"java": "1.8",
|
||||||
"builder": {
|
"builder": {
|
||||||
"name": "gradle",
|
"name": "gradle",
|
||||||
|
|||||||
Reference in New Issue
Block a user