mirror of
https://gitee.com/BDWare/contract-java-example.git
synced 2026-02-14 16:49:30 +00:00
update front development guide
This commit is contained in:
@@ -39,7 +39,7 @@ sourceSets {
|
||||
dependencies {
|
||||
api 'org.apache.logging.log4j:log4j-core:2.17.2'
|
||||
api 'org.apache.logging.log4j:log4j-api:2.17.2'
|
||||
implementation 'org.bdware.sc:cp:1.6.8'
|
||||
implementation 'org.bdware.sc:cp:1.8.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
}
|
||||
|
||||
@@ -52,7 +52,12 @@ task copyYJS(type: Copy) {
|
||||
from "./yjs"
|
||||
into "./build/output/"
|
||||
}
|
||||
|
||||
//TODO 针对不同的前端,可以仅复制所需的前端代码,而不是整个前端目录。
|
||||
//比如: from "../front/vite/dist"
|
||||
task copyFront(type: Copy) {
|
||||
from "../front"
|
||||
into "./build/output/assets"
|
||||
}
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allJava
|
||||
archiveClassifier = 'sources'
|
||||
@@ -72,7 +77,7 @@ task copyJar(type: Copy, dependsOn: [":backend:jar", ":backend:copyLibs"]) {
|
||||
}
|
||||
def reltivePath = "./backend"
|
||||
//reltivePath="."
|
||||
def currVersion = "1.3.2"
|
||||
def currVersion = "1.3.3"
|
||||
task grepCP(dependsOn: ["copyJar"]) {
|
||||
doLast {
|
||||
org.bdware.datanet.YPKPacker.grepJarByCPVersion("${reltivePath}/build/output/libs", org.bdware.datanet.CPVersion.cp_1_6_8)
|
||||
@@ -83,7 +88,7 @@ task grepCP(dependsOn: ["copyJar"]) {
|
||||
tasks.processResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE)
|
||||
tasks.processTestResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE)
|
||||
|
||||
task buildZip(type: Zip, dependsOn: ["copyAssets", "copyJar", "copyYJS", "grepCP"]) {
|
||||
task buildZip(type: Zip, dependsOn: ["copyAssets", "copyJar", "copyYJS", "grepCP", "copyFront"]) {
|
||||
from './build/output/'
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
archiveFileName = 'contractexample.zip'
|
||||
@@ -95,6 +100,7 @@ task buildYPK(dependsOn: ["buildZip"]) {
|
||||
org.bdware.datanet.YPKPacker.staticPack("${reltivePath}/build/contractexample.zip", "${reltivePath}/build/contractexample-${currVersion}.ypk")
|
||||
}
|
||||
}
|
||||
|
||||
task deploy(dependsOn: ["buildYPK"]) {
|
||||
doLast {
|
||||
org.bdware.ypkdeploy.HTTPTool.deployWithYpk("${reltivePath}/debugconf.json", "${reltivePath}/build/contractexample-${currVersion}.ypk")
|
||||
|
||||
Reference in New Issue
Block a user