update front development guide

This commit is contained in:
CaiHQ
2023-03-18 21:57:34 +08:00
parent acc103e6a4
commit adcb9d40a5
18 changed files with 2400 additions and 151 deletions

View File

@@ -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")

View File

@@ -2,7 +2,7 @@
"agentAddress": "127.0.0.1:21030",
"publicKey": "04180354fdb6507f8ab98ccfbe165ce11da74ba733f81af86ad6d32216b32cf4f797c559d50ceeefbf4c760c3483840471c67471b90acdffb388cd7d496d9a1610",
"privateKey": "1d4196947f59532db6f8f4055e58474a48db8f30b476ae3edc66406464521b3b",
"ypkPath": "./build/contractexample-1.3.0.ypk",
"ypkPath": "./build/contractexample-1.3.3.ypk",
"killBeforeStart": "ContractExample",
"createParam": {
},