Skip to content

Commit ddb9f8e

Browse files
committed
ANDROID: update dependencies
1 parent d59a376 commit ddb9f8e

File tree

8 files changed

+75
-18
lines changed

8 files changed

+75
-18
lines changed

src/platform/android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
22

33
android {
44
// app can use the API features included in this API level and lower.
5-
compileSdkVersion 33
5+
compileSdk 34
66

77
// can override some attributes in main/AndroidManifest.xml
88
defaultConfig {
99
applicationId 'net.sourceforge.smallbasic'
1010
minSdkVersion 16
11-
targetSdkVersion 33
11+
targetSdkVersion 34
1212
versionCode 59
1313
versionName '12.26'
1414
resConfigs 'en'
@@ -59,6 +59,6 @@ android {
5959
}
6060

6161
dependencies {
62-
implementation 'androidx.core:core:1.10.0'
62+
implementation 'androidx.core:core:1.12.0'
6363
testImplementation 'junit:junit:4.13.2'
6464
}

src/platform/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:8.0.1'
8+
classpath 'com.android.tools.build:gradle:8.3.0'
99
}
1010
}
1111

@@ -18,11 +18,11 @@ allprojects {
1818

1919
apply plugin: 'idea'
2020

21-
task clean(type: Delete) {
21+
tasks.register('clean', Delete) {
2222
delete rootProject.buildDir
2323
}
2424

25-
task test {
25+
tasks.register('test') {
2626
doLast {
2727
exec {
2828
commandLine 'sh', '-c', 'adb -a logcat -c && \
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:react/recommended"
9+
],
10+
"overrides": [
11+
{
12+
"env": {
13+
"node": true
14+
},
15+
"files": [
16+
".eslintrc.{js,cjs}"
17+
],
18+
"parserOptions": {
19+
"sourceType": "script"
20+
}
21+
}
22+
],
23+
"parserOptions": {
24+
"ecmaVersion": "latest",
25+
"sourceType": "module"
26+
},
27+
"plugins": [
28+
"react"
29+
],
30+
"rules": {
31+
"react/prop-types": "off"
32+
}
33+
}

src/platform/android/webui/public/index.html renamed to src/platform/android/webui/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
<body>
1111
<noscript>You need to enable JavaScript to run this app.</noscript>
1212
<div id="root"></div>
13+
<script type="module" src="/src/index.jsx"></script>
1314
</body>
1415
</html>

src/platform/android/webui/package.json

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,28 @@
22
"name": "webui",
33
"version": "1.0.0",
44
"private": true,
5-
"proxy": "http://localhost:8080",
65
"dependencies": {
7-
"@emotion/react": "^11.11.0",
6+
"@emotion/react": "^11.11.4",
87
"@emotion/styled": "^11.11.0",
9-
"@mui/icons-material": "^5.11.16",
10-
"@mui/material": "^5.13.0",
11-
"@mui/x-data-grid": "^6.3.1",
12-
"npm-check-updates": "^16.10.12",
8+
"@mui/icons-material": "^5.15.12",
9+
"@mui/material": "^5.15.12",
10+
"@mui/x-data-grid": "^6.19.6",
1311
"react": "^18.2.0",
1412
"react-dom": "^18.2.0",
15-
"react-scripts": "5.0.1"
13+
"vite-plugin-eslint": "^1.8.1"
14+
},
15+
"devDependencies": {
16+
"@vitejs/plugin-react": "^4.2.1",
17+
"eslint": "^8.57.0",
18+
"eslint-plugin-react": "^7.34.0",
19+
"npm-check-updates": "^16.14.15",
20+
"vite": "^5.1.5",
21+
"vite-tsconfig-paths": "^4.3.1"
1622
},
1723
"scripts": {
18-
"start": "react-scripts start",
19-
"build": "GENERATE_SOURCEMAP=false react-scripts build && rm ../app/src/main/assets/webui/static/js/main.* && cp -R build/* ../app/src/main/assets/webui/",
20-
"update": "npm update && ncu -u"
24+
"start": "vite --host",
25+
"build": "GENERATE_SOURCEMAP=false vite && rm ../app/src/main/assets/webui/static/js/main.* && cp -R build/* ../app/src/main/assets/webui/",
26+
"update": "npm update && ncu -u && npm install && npm audit fix"
2127
},
2228
"eslintConfig": {
2329
"extends": [

src/platform/android/webui/src/App.js renamed to src/platform/android/webui/src/App.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
21
import {
2+
React,
33
Fragment,
44
useState
55
} from 'react';
@@ -290,7 +290,7 @@ function onCellEditCommit(props, params, setError) {
290290
});
291291
}
292292
});
293-
};
293+
}
294294

295295
function FileList(props) {
296296
const [selectionModel, setSelectionModel] = useState([]);
File renamed without changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineConfig } from 'vite'
2+
import react from '@vitejs/plugin-react'
3+
import eslint from 'vite-plugin-eslint'
4+
5+
export default defineConfig({
6+
base: '/',
7+
plugins: [react(), eslint()],
8+
server: {
9+
open: true,
10+
port: 3000,
11+
proxy: {
12+
'/api': {
13+
target: 'http://localhost:8080'
14+
}
15+
}
16+
},
17+
})

0 commit comments

Comments
 (0)