mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-20 19:47:44 -04:00
!1013 fix sdk change bug
Merge pull request !1013 from 卡哥/OpenHarmony-3.1-Release
This commit is contained in:
@@ -66,6 +66,8 @@ function initProjectConfig(projectConfig) {
|
||||
path.resolve(__dirname, 'node_modules/.cache');
|
||||
projectConfig.aceSoPath = projectConfig.aceSoPath || process.env.aceSoPath;
|
||||
projectConfig.xtsMode = /ets_loader_ark$/.test(__dirname);
|
||||
projectConfig.localPropertiesPath = projectConfig.localPropertiesPath || process.env.localPropertiesPath
|
||||
projectConfig.projectProfilePath = projectConfig.projectProfilePath || process.env.projectProfilePath
|
||||
}
|
||||
|
||||
function loadEntryObj(projectConfig) {
|
||||
@@ -369,6 +371,17 @@ function saveAppResourcePath(appResourcePath, appResourcePathSavePath) {
|
||||
}
|
||||
}
|
||||
|
||||
function addSDKBuildDependencies(config) {
|
||||
if (projectConfig.localPropertiesPath &&
|
||||
fs.existsSync(projectConfig.localPropertiesPath) && config.cache) {
|
||||
config.cache.buildDependencies.config.push(projectConfig.localPropertiesPath)
|
||||
}
|
||||
if (projectConfig.projectProfilePath &&
|
||||
fs.existsSync(projectConfig.projectProfilePath) && config.cache) {
|
||||
config.cache.buildDependencies.config.push(projectConfig.projectProfilePath)
|
||||
}
|
||||
}
|
||||
|
||||
const globalProgram = {
|
||||
program: null,
|
||||
watchProgram: null
|
||||
@@ -384,3 +397,4 @@ exports.abilityConfig = abilityConfig;
|
||||
exports.readWorkerFile = readWorkerFile;
|
||||
exports.systemModules = systemModules;
|
||||
exports.checkAppResourcePath = checkAppResourcePath;
|
||||
exports.addSDKBuildDependencies = addSDKBuildDependencies;
|
||||
|
||||
@@ -27,7 +27,8 @@ const {
|
||||
loadWorker,
|
||||
abilityConfig,
|
||||
readWorkerFile,
|
||||
checkAppResourcePath
|
||||
checkAppResourcePath,
|
||||
addSDKBuildDependencies
|
||||
} = require('./main');
|
||||
const { ResultStates } = require('./lib/compile_info');
|
||||
const { processUISyntax } = require('./lib/process_ui_syntax');
|
||||
@@ -350,6 +351,7 @@ module.exports = (env, argv) => {
|
||||
|
||||
const appResourcePath = env.appResource || process.env.appResource;
|
||||
checkAppResourcePath(appResourcePath, config);
|
||||
addSDKBuildDependencies(config);
|
||||
config.output.library = projectConfig.hashProjectPath;
|
||||
return config;
|
||||
}
|
||||
Reference in New Issue
Block a user