Skip to content

Commit

Permalink
Fix Android
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Dec 30, 2023
1 parent a51c0a6 commit 0001820
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ module.exports = {
cordovaChromeapi: true,
appAvailability: true,
// end cordova bindings

// globals for vite
__APP_PRODUCTNAME__: "readonly",
__APP_VERSION__: "readonly",
__APP_REVISION__: "readonly",
'__APP_PRODUCTNAME__': "readonly",
'__APP_VERSION__': "readonly",
'__APP_REVISION__': "readonly",
},
// ignore src/dist folders
ignorePatterns: ["src/dist/*"],
Expand Down
13 changes: 10 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,17 +353,23 @@ function processPackage(done, gitRevision, isReleaseBuild) {
}

function dist_src() {
const platforms = getPlatforms();

const distSources = [
'./src/**/*',
'!./src/**/*.js',
'!./src/**/*.vue',
'!./src/css/dropdown-lists/LICENSE',
'!./src/support/**',
'!./src/**/*.less',
'./src/js/workers/hex_parser.js',
'./src/js/tabs/map.js',
];

if (platforms.indexOf('android') >= 0) {
distSources
.push('!./src/**/*.js')
.push('!./src/**/*.vue')
.push('./src/js/workers/hex_parser.js');
}

return gulp.src(distSources, { base: 'src' })
.pipe(gulp.src('yarn.lock'))
.pipe(gulp.dest(DIST_DIR));
Expand Down Expand Up @@ -1073,6 +1079,7 @@ function cordova_packagejson() {
return gulp.src(`${CORDOVA_DIST_DIR}package.json`)
.pipe(jeditor({
'name': metadata.name,
'productName': metadata.productName,
'description': metadata.description,
'version': metadata.version,
'author': metadata.author,
Expand Down
6 changes: 3 additions & 3 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ function serveLocalesPlugin() {

export default defineConfig({
define: {
'__APP_VERSION__': JSON.stringify(pkg.version),
'__APP_PRODUCTNAME__': JSON.stringify(pkg.productName),
'__APP_REVISION__': JSON.stringify(commitHash),
__APP_VERSION__: JSON.stringify(pkg.version),
__APP_PRODUCTNAME__: JSON.stringify(pkg.productName),
__APP_REVISION__: JSON.stringify(commitHash),
},
test: {
// NOTE: this is a replacement location for karma tests.
Expand Down

0 comments on commit 0001820

Please sign in to comment.