Skip to content

Commit 99d1dab

Browse files
author
Ajit Kumar
committed
2 parents 257d6eb + 6aa3919 commit 99d1dab

File tree

73 files changed

+1619
-639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1619
-639
lines changed

.vscode/plugins.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"plugins":["cordova-plugin-buildinfo","cordova-plugin-device","cordova-plugin-file","cordova-plugin-ftp","cordova-plugin-iap","cordova-plugin-server","cordova-plugin-sftp","cordova-clipboard","cordova-plugin-vibration","cordova-plugin-sdcard","cordova-plugin-system","cordova-plugin-browser"]}
1+
{"plugins":["cordova-plugin-buildinfo","cordova-plugin-device","cordova-plugin-file","cordova-plugin-ftp","cordova-plugin-iap","cordova-plugin-sdcard","cordova-plugin-server","cordova-plugin-sftp","cordova-clipboard","cordova-plugin-browser","cordova-plugin-system"]}

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"anyscript",
4747
"applescript",
4848
"ARGB",
49+
"Astro",
4950
"Asuming",
5051
"audiotrack",
5152
"autocorrect",
@@ -123,6 +124,7 @@
123124
"firebasehosting",
124125
"firestore",
125126
"flac",
127+
"Flix",
126128
"floobits",
127129
"Foxdebug",
128130
"freemarker",

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Change Log
22

3+
## [1.10.0]
4+
5+
- New
6+
- [x] **Ace editor** | 937
7+
- Updated Ace editor to version 1.32.7
8+
- Fixes
9+
- [x] **UI** | 944
10+
- Fixed status and navigation text color not visible in light theme.
11+
- [x] **Plugin** | 944
12+
- Fixed updates for plugin not showing up.
13+
14+
- Fixes
15+
- [x] **Text selection** | 937
16+
- Fixed context menu not showing up when selecting all text from context menu after click and hold.
17+
318
## [1.9.0]
419

520
- New

build-extras.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
ext.cdvCompileSdkVersion = 31
2-
31
configurations {
42
all {
53
exclude module: 'commons-logging'

config.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8' ?>
2-
<widget id="com.foxdebug.acode" android-versionCode="936" version="1.9.0"
2+
<widget id="com.foxdebug.acode" android-versionCode="944" version="1.10.0"
33
xmlns="http://www.w3.org/ns/widgets"
44
xmlns:android="http://schemas.android.com/apk/res/android"
55
xmlns:cdv="http://cordova.apache.org/ns/1.0">
@@ -29,8 +29,6 @@
2929
<preference name="DisallowOverscroll" value="true" />
3030
<preference name="BackgroundColor" value="0xFF313131" />
3131
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
32-
<preference name="android-minSdkVersion" value="22" />
33-
<preference name="android-targetSdkVersion" value="33" />
3432
<preference name="AndroidLaunchMode" value="singleTask" />
3533
<preference name="prerendered-icon" value="false" />
3634
<preference name="androidxEnabled" value="true" />
@@ -70,14 +68,14 @@
7068
</config-file>
7169

7270
<config-file target="AndroidManifest.xml" parent="/manifest">
71+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
72+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
7373
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
7474
<uses-permission android:name="android.permission.VIBRATE" />
7575
<!-- <uses-permission android:name="com.termux.permission.RUN_COMMAND" /> -->
7676
</config-file>
7777

7878
<hook type="before_prepare" src="hooks/modify-java-files.js" />
79-
<hook type="before_prepare" src="hooks/post-process.js" />
80-
<hook type="before_prepare" src="hooks/copy-resources.js" />
81-
<hook type="before_prepare" src="hooks/move-files.js" />
79+
<hook type="after_prepare" src="hooks/post-process.js" />
8280
</platform>
8381
</widget>

hooks/copy-resources.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

hooks/modify-java-files.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require('./update-mimetype');
21
const path = require('path');
32
const fs = require('fs');
43
const prettier = require('prettier');

hooks/post-process.js

Lines changed: 109 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,118 @@
1+
/* eslint-disable no-console */
12
const path = require('path');
23
const fs = require('fs');
34

4-
const resPath = path.resolve(
5+
const buildFilePath = path.resolve(__dirname, '../build.json');
6+
const copyToPath = path.resolve(__dirname, '../platforms/android/build.json');
7+
const gradleFilePath = path.resolve(__dirname, '../build-extras.gradle');
8+
const androidGradleFilePath = path.resolve(
59
__dirname,
6-
'../platforms/android/app/src/main/res/'
10+
'../platforms/android/app/build-extras.gradle'
711
);
12+
const resPath = path.resolve(__dirname, '../platforms/android/app/src/main/res/');
13+
const localResPath = path.resolve(__dirname, '../res/android/');
814

9-
const splashScreens = [
10-
'mipmap-ldpi',
11-
'mipmap-hdpi-v26',
12-
'mipmap-ldpi-v26',
13-
'mipmap-mdpi-v26',
14-
'mipmap-xhdpi-v26',
15-
'mipmap-xxhdpi-v26',
16-
'mipmap-xxxhdpi-v26',
17-
'drawable-land-hdpi',
18-
'drawable-land-ldpi',
19-
'drawable-land-mdpi',
20-
'drawable-land-xhdpi',
21-
'drawable-land-xxhdpi',
22-
'drawable-land-xxxhdpi',
23-
'drawable-port-hdpi',
24-
'drawable-port-ldpi',
25-
'drawable-port-mdpi',
26-
'drawable-port-xhdpi',
27-
'drawable-port-xxhdpi',
28-
'drawable-port-xxxhdpi',
29-
];
30-
31-
for (let splashScreen of splashScreens) {
32-
const file = path.join(resPath, splashScreen);
33-
if (fs.existsSync(file)) {
34-
fs.rmSync(file, {
35-
recursive: true,
15+
if (
16+
!fs.existsSync(copyToPath)
17+
&& fs.existsSync(buildFilePath)
18+
) fs.copyFileSync(buildFilePath, copyToPath);
19+
20+
if (fs.existsSync(androidGradleFilePath)) fs.unlinkSync(androidGradleFilePath);
21+
fs.copyFileSync(gradleFilePath, androidGradleFilePath);
22+
23+
deleteDirRecursively(resPath, [
24+
path.join('values', 'strings.xml'),
25+
path.join('values', 'colors.xml'),
26+
path.join('values', 'styles.xml'),
27+
'anim',
28+
'xml',
29+
]);
30+
copyDirRecursively(localResPath, resPath);
31+
32+
/**
33+
* Copy directory recursively
34+
* @param {string} src Source directory
35+
* @param {string} dest Destination directory
36+
* @param {string[]} skip Files to not copy
37+
*/
38+
function copyDirRecursively(src, dest, skip = [], currPath = '') {
39+
const exists = fs.existsSync(src);
40+
const stats = exists && fs.statSync(src);
41+
const isDirectory = exists && stats.isDirectory();
42+
43+
if (!exists) {
44+
console.log(`File ${src} does not exist`);
45+
return;
46+
}
47+
48+
if (!fs.existsSync(dest) && isDirectory) {
49+
fs.mkdirSync(dest);
50+
}
51+
52+
if (exists && isDirectory) {
53+
fs.mkdirSync(dest, { recursive: true });
54+
fs.readdirSync(src).forEach((childItemName) => {
55+
const relativePath = path.join(currPath, childItemName);
56+
if (childItemName.startsWith('.')) return;
57+
if (skip.includes(childItemName) || skip.includes(relativePath)) return;
58+
copyDirRecursively(
59+
path.join(src, childItemName),
60+
path.join(dest, childItemName),
61+
skip,
62+
childItemName,
63+
);
64+
});
65+
} else {
66+
fs.copyFileSync(src, dest);
67+
68+
// log
69+
const message = `copied: ${path.basename(src)}`;
70+
console.log('\x1b[32m%s\x1b[0m', message); // green
71+
}
72+
}
73+
74+
/**
75+
* Delete directory recursively
76+
* @param {string} dir Directory to delete
77+
* @param {string[]} except Files to not delete
78+
*/
79+
function deleteDirRecursively(dir, except = [], currPath = '') {
80+
const exists = fs.existsSync(dir);
81+
const stats = exists && fs.statSync(dir);
82+
const isDirectory = exists && stats.isDirectory();
83+
84+
if (!exists) {
85+
console.log(`File ${dir} does not exist`);
86+
return;
87+
}
88+
89+
if (exists && isDirectory) {
90+
let deleteDir = true;
91+
fs.readdirSync(dir).forEach((childItemName) => {
92+
const relativePath = path.join(currPath, childItemName);
93+
if (
94+
childItemName.startsWith('.')
95+
|| except.includes(childItemName)
96+
|| except.includes(relativePath)
97+
) {
98+
console.log('\x1b[33m%s\x1b[0m', `skipped: ${relativePath}`); // yellow
99+
deleteDir = false;
100+
return;
101+
}
102+
103+
deleteDirRecursively(
104+
path.join(dir, childItemName),
105+
except,
106+
childItemName,
107+
);
36108
});
37-
console.log('Removed: ', splashScreen);
109+
110+
if (deleteDir) {
111+
console.log('\x1b[31m%s\x1b[0m', `deleted: ${currPath || path.basename(dir)}`); // red
112+
fs.rmSync(dir, { recursive: true });
113+
}
114+
} else {
115+
console.log('\x1b[31m%s\x1b[0m', `deleted: ${currPath || path.basename(dir)}`); // red
116+
fs.rmSync(dir);
38117
}
39118
}

hooks/update-mimetype.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)