@pi-r/android 0.6.6 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -6
- package/data/google-maven-snapshot.json +1 -1
- package/data/google-maven.json +1 -1
- package/extensions/app/manifest/index.js +88 -80
- package/extensions/gradle/dependencies/index.js +16 -13
- package/extensions/task/index.js +1 -1
- package/index.js +37 -33
- package/package.json +3 -3
- package/template/java/static/build.gradle +2 -2
- package/template/java+kotlin/build.gradle +1 -1
- package/template/java+kotlin/static/build.gradle +2 -2
- package/template/kotlin/build.gradle.kts +1 -1
- package/template/kotlin/static/build.gradle.kts +2 -2
- package/types/squared.d.ts +7 -6
|
@@ -8,15 +8,16 @@ const util_1 = require("@e-mc/document/util");
|
|
|
8
8
|
const types_1 = require("@e-mc/types");
|
|
9
9
|
const Parser = htmlparser2.Parser;
|
|
10
10
|
const DomHandler = domhandler.DomHandler;
|
|
11
|
+
const MANIFEST_ATTR = ['package', 'android:sharedUserId', 'android:sharedUserLabel', 'android:sharedUserMaxSdkVersion', 'android:versionCode', 'android:versionName', 'android:installLocation'];
|
|
11
12
|
module.exports = function finalize(instance) {
|
|
12
13
|
const config = instance.config;
|
|
13
|
-
|
|
14
|
+
const manifest = config.manifest;
|
|
15
|
+
if (!manifest) {
|
|
14
16
|
return;
|
|
15
17
|
}
|
|
16
18
|
let { localUri, source, existing } = instance.findTemplate(path.join(this.baseDirectory, config.mainParentDir, config.mainSrcDir), "AndroidManifest.xml", { detect: this.incremental !== 'staging' });
|
|
17
19
|
if (localUri && source && instance.canWrite(localUri, { ownPermissionOnly: true })) {
|
|
18
|
-
const {
|
|
19
|
-
const { supportsRtl, label, theme, activity, metaData = [], activityName, fontProvider } = application;
|
|
20
|
+
const { supportsRtl, label, theme, activity, metaData = [], activityName, fontProvider } = manifest.application || {};
|
|
20
21
|
const profileable = config.profileable;
|
|
21
22
|
let modified;
|
|
22
23
|
if (!existing) {
|
|
@@ -37,116 +38,123 @@ module.exports = function finalize(instance) {
|
|
|
37
38
|
}
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
else if (
|
|
41
|
+
else if (theme || activityName || activity || supportsRtl !== undefined) {
|
|
41
42
|
new Parser(new DomHandler((err, dom) => {
|
|
42
43
|
if (err) {
|
|
43
44
|
instance.writeFail(['Unable to parse XML document', "AndroidManifest.xml"], err, 0);
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
-
if (
|
|
48
|
-
|
|
47
|
+
const target = domutils.findOne(elem => elem.tagName === 'application', dom, true);
|
|
48
|
+
if (!target) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (label) {
|
|
52
|
+
target.attribs['android:label'] = '@string/' + label;
|
|
49
53
|
modified = true;
|
|
50
54
|
}
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const attribs = item.attribs;
|
|
73
|
-
attribs['android:name'] = activityName;
|
|
74
|
-
attribs['android:exported'] = 'true';
|
|
75
|
-
modified = true;
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
55
|
+
if (theme) {
|
|
56
|
+
target.attribs['android:theme'] = '@style/' + theme;
|
|
57
|
+
modified = true;
|
|
58
|
+
}
|
|
59
|
+
if (supportsRtl !== undefined) {
|
|
60
|
+
target.attribs['android:supportsRtl'] = supportsRtl.toString();
|
|
61
|
+
modified = true;
|
|
62
|
+
}
|
|
63
|
+
if (activityName || activity) {
|
|
64
|
+
const activities = domutils.getElementsByTagName('activity', target, true);
|
|
65
|
+
if (activityName) {
|
|
66
|
+
for (const item of activities) {
|
|
67
|
+
const intentFilter = domutils.findAll(elem => elem.tagName === 'intent-filter', [item]);
|
|
68
|
+
if (intentFilter.length) {
|
|
69
|
+
const action = domutils.findOne(elem => elem.tagName === 'action' && elem.attribs['android:name'] === 'android.intent.action.MAIN', intentFilter);
|
|
70
|
+
if (action) {
|
|
71
|
+
const attribs = item.attribs;
|
|
72
|
+
attribs['android:name'] = activityName;
|
|
73
|
+
attribs['android:exported'] = 'true';
|
|
74
|
+
modified = true;
|
|
75
|
+
break;
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
78
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
break;
|
|
79
|
+
}
|
|
80
|
+
if (activity) {
|
|
81
|
+
for (const name in activity) {
|
|
82
|
+
const { layout: attribs } = activity[name];
|
|
83
|
+
if (attribs) {
|
|
84
|
+
let element = domutils.findOne(elem => elem.attribs['android:name'] === name, activities);
|
|
85
|
+
if (!element) {
|
|
86
|
+
domutils.appendChild(target, element = new domhandler.Element('activity', { 'android:name': name }));
|
|
87
|
+
domutils.append(element, new domhandler.Text('\n'));
|
|
88
|
+
}
|
|
89
|
+
let layout = domutils.findOne(elem => elem.tagName === 'layout', [element]), found = true;
|
|
90
|
+
if (!layout) {
|
|
91
|
+
domutils.appendChild(element, layout = new domhandler.Element('layout', {}));
|
|
92
|
+
domutils.append(layout, new domhandler.Text('\n'));
|
|
93
|
+
found = false;
|
|
94
|
+
}
|
|
95
|
+
for (const attr in attribs) {
|
|
96
|
+
switch (attr) {
|
|
97
|
+
case 'defaultHeight':
|
|
98
|
+
case 'defaultWidth':
|
|
99
|
+
case 'minHeight':
|
|
100
|
+
case 'minWidth':
|
|
101
|
+
case 'gravity': {
|
|
102
|
+
const value = attribs[attr];
|
|
103
|
+
if (!found || layout.attribs['android:' + attr] !== value) {
|
|
104
|
+
layout.attribs['android:' + attr] = value;
|
|
105
|
+
modified = true;
|
|
109
106
|
}
|
|
107
|
+
break;
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
111
|
}
|
|
114
112
|
}
|
|
115
113
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
else if (profileable) {
|
|
123
|
-
domutils.appendChild(target, new domhandler.Element('profileable', attribs));
|
|
124
|
-
domutils.appendChild(target, new domhandler.Text('\n'));
|
|
125
|
-
}
|
|
126
|
-
modified = true;
|
|
114
|
+
}
|
|
115
|
+
if (profileable !== undefined) {
|
|
116
|
+
const attribs = profileable ? { 'android:shell': 'true', 'android:enabled': 'true' } : { 'android:enabled': 'false' };
|
|
117
|
+
const element = domutils.findOne(elem => elem.tagName === 'profileable', [target]);
|
|
118
|
+
if (element) {
|
|
119
|
+
Object.assign(element.attribs, attribs);
|
|
127
120
|
}
|
|
128
|
-
if (
|
|
129
|
-
|
|
121
|
+
else if (profileable) {
|
|
122
|
+
domutils.appendChild(target, new domhandler.Element('profileable', attribs));
|
|
123
|
+
domutils.appendChild(target, new domhandler.Text('\n'));
|
|
130
124
|
}
|
|
125
|
+
modified = true;
|
|
126
|
+
}
|
|
127
|
+
if (modified) {
|
|
128
|
+
source = domserializer.default(dom, { xmlMode: true });
|
|
131
129
|
}
|
|
132
130
|
}), { xmlMode: true, decodeEntities: false }).end(source);
|
|
133
131
|
}
|
|
134
132
|
if (fontProvider) {
|
|
135
133
|
metaData.push({ name: 'preloaded_fonts', resource: '@array/' + fontProvider });
|
|
136
134
|
}
|
|
137
|
-
|
|
135
|
+
const keys = Object.keys(manifest).map(attr => MANIFEST_ATTR.includes(attr) ? attr : attr !== 'package' && MANIFEST_ATTR.includes('android:' + attr) ? attr : '').filter(item => item);
|
|
136
|
+
if (keys.length || (0, types_1.isArray)(metaData)) {
|
|
138
137
|
new Parser(new DomHandler((err, dom) => {
|
|
139
138
|
if (err) {
|
|
140
139
|
instance.writeFail(['Unable to parse XML document', "AndroidManifest.xml"], err, 0);
|
|
141
140
|
return;
|
|
142
141
|
}
|
|
143
|
-
|
|
144
|
-
if (
|
|
142
|
+
let target = null;
|
|
143
|
+
if (keys.length && (target = domutils.findOne(elem => elem.tagName === 'manifest', dom, true))) {
|
|
144
|
+
for (let key of keys) {
|
|
145
|
+
if (!key.startsWith('android:') && key !== 'package') {
|
|
146
|
+
key = 'android:' + key;
|
|
147
|
+
}
|
|
148
|
+
target.attribs[key] = manifest[key]?.toString() || '';
|
|
149
|
+
modified = true;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if ((0, types_1.isArray)(metaData) && (target = domutils.findOne(elem => elem.tagName === 'application', dom, true))) {
|
|
145
153
|
for (const { name, resource, value } of metaData) {
|
|
146
154
|
if (name && (resource || value)) {
|
|
147
|
-
let item = domutils.findOne(elem => elem.tagName === 'meta-data' && elem.attribs['android:name'] === name,
|
|
155
|
+
let item = domutils.findOne(elem => elem.tagName === 'meta-data' && elem.attribs['android:name'] === name, target.childNodes);
|
|
148
156
|
if (!item) {
|
|
149
|
-
domutils.appendChild(
|
|
157
|
+
domutils.appendChild(target, item = new domhandler.Element('meta-data', { 'android:name': name }));
|
|
150
158
|
domutils.append(item, new domhandler.Text('\n'));
|
|
151
159
|
}
|
|
152
160
|
else if (item.attribs['android:resource'] === resource || item.attribs['android:value'] === value) {
|
|
@@ -29,8 +29,8 @@ function isUpgrade(version, pending) {
|
|
|
29
29
|
}
|
|
30
30
|
module.exports = function finalize(instance) {
|
|
31
31
|
const config = instance.config;
|
|
32
|
-
const { profileable, dependencies, dataBinding, versionName, versionCode, namespace } = config;
|
|
33
|
-
if (!profileable && !dependencies && !dataBinding && !versionName && !versionCode && !namespace) {
|
|
32
|
+
const { profileable, dependencies, dataBinding, versionName, versionCode, namespace, applicationId } = config;
|
|
33
|
+
if (!profileable && !dependencies && !dataBinding && !versionName && !versionCode && !namespace && !applicationId) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
const detect = this.incremental !== 'staging';
|
|
@@ -48,8 +48,8 @@ module.exports = function finalize(instance) {
|
|
|
48
48
|
if (dependencies) {
|
|
49
49
|
let data;
|
|
50
50
|
const hasScope = (value) => (0, types_1.isArray)(dependencyScopes) && dependencyScopes.includes(value) || dependencyScopes === value;
|
|
51
|
-
const snapshot = hasScope('snapshot');
|
|
52
|
-
const getData = () => data
|
|
51
|
+
const snapshot = dependencyScopes === 1 || hasScope('snapshot');
|
|
52
|
+
const getData = () => data ||= instance.findData('google-maven' + (snapshot ? '-snapshot' : '') + '.json', 'json');
|
|
53
53
|
const items = dependencies.map(item => {
|
|
54
54
|
let [groupId, artifactId, version, type] = item.split(':');
|
|
55
55
|
if (!version || version === 'maven') {
|
|
@@ -75,7 +75,7 @@ module.exports = function finalize(instance) {
|
|
|
75
75
|
if (target.dependencies) {
|
|
76
76
|
let found;
|
|
77
77
|
for (const { groupId, artifactId, version, scope } of target.dependencies) {
|
|
78
|
-
if (scope && (dependencyScopes === true || hasScope(scope))) {
|
|
78
|
+
if (scope && (dependencyScopes === true || dependencyScopes === 1 || hasScope(scope))) {
|
|
79
79
|
let type = -1;
|
|
80
80
|
switch (scope) {
|
|
81
81
|
case 'compile':
|
|
@@ -249,7 +249,7 @@ module.exports = function finalize(instance) {
|
|
|
249
249
|
}
|
|
250
250
|
if (items.length) {
|
|
251
251
|
const newline = process.platform === 'win32' ? '\r\n' : '\n';
|
|
252
|
-
indent
|
|
252
|
+
indent ||= (0, util_1.getIndent)(source);
|
|
253
253
|
content = items.reduce((a, b) => a + indent + writeMethod(b) + newline, content);
|
|
254
254
|
modified = true;
|
|
255
255
|
}
|
|
@@ -266,7 +266,7 @@ module.exports = function finalize(instance) {
|
|
|
266
266
|
else {
|
|
267
267
|
output = Document.updateGradle(output, ['plugins'], "id 'org.jetbrains.kotlin.android'", { upgrade: true, multiple: true, addendum: `version '${instance.findVersion('org.jetbrains.kotlin:kotlin-stdlib', "1.9.23")}'` });
|
|
268
268
|
output = Document.updateGradle(output, ['android', 'buildFeatures'], "compose true");
|
|
269
|
-
output = Document.updateGradle(output, ['android', 'composeOptions'], `kotlinCompilerExtensionVersion '${instance.findVersion('kotlinCompilerExtensionVersion', "1.5.
|
|
269
|
+
output = Document.updateGradle(output, ['android', 'composeOptions'], `kotlinCompilerExtensionVersion '${instance.findVersion('kotlinCompilerExtensionVersion', "1.5.12")}'`, true);
|
|
270
270
|
if (upgrade) {
|
|
271
271
|
output = Document.updateGradle(output, ['android', 'kotlinOptions'], `jvmTarget = '${javaVersion}'`, true);
|
|
272
272
|
}
|
|
@@ -317,7 +317,6 @@ module.exports = function finalize(instance) {
|
|
|
317
317
|
output = Document.updateGradle(output, ['android'], kotlin ? `buildToolsVersion = "${version}"` : `buildToolsVersion "${version}"`, true);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
const applicationId = config.manifest?.package;
|
|
321
320
|
if (applicationId) {
|
|
322
321
|
output = Document.updateGradle(output, ['android', 'defaultConfig'], (kotlin ? 'applicationId = ' : 'applicationId ') + `"${applicationId}"`, true);
|
|
323
322
|
}
|
|
@@ -331,11 +330,15 @@ module.exports = function finalize(instance) {
|
|
|
331
330
|
}
|
|
332
331
|
if (profileable) {
|
|
333
332
|
let name, items;
|
|
334
|
-
if (
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
if ((0, types_1.isArray)(profileable)) {
|
|
334
|
+
name = profileable[0];
|
|
335
|
+
if (typeof name === 'string' && !name.startsWith('--')) {
|
|
336
|
+
items = profileable.slice(1);
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
name = '';
|
|
340
|
+
items = profileable;
|
|
337
341
|
}
|
|
338
|
-
items = profileable;
|
|
339
342
|
}
|
|
340
343
|
else if (typeof profileable === 'string') {
|
|
341
344
|
if (profileable.startsWith('--')) {
|
|
@@ -345,7 +348,7 @@ module.exports = function finalize(instance) {
|
|
|
345
348
|
name = profileable;
|
|
346
349
|
}
|
|
347
350
|
}
|
|
348
|
-
name
|
|
351
|
+
name ||= 'debug';
|
|
349
352
|
setModified(Document.updateGradle(source, ['android', 'buildTypes', kotlin ? 'getByName("release")' : 'release'], 'signingConfig ' + (kotlin ? `= signingConfigs.getByName("${name}")` : 'signingConfigs.' + name), true));
|
|
350
353
|
if ((0, types_1.isArray)(items)) {
|
|
351
354
|
const parameters = items.map(value => `"${value}"`).join(', ');
|
package/extensions/task/index.js
CHANGED
|
@@ -117,6 +117,6 @@ module.exports = async function finalize(instance) {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
})
|
|
120
|
-
.catch(err => instance.writeFail(["Unable to perform task", command + ' ' + task], err, { type: 4, startTime }));
|
|
120
|
+
.catch((err) => instance.writeFail(["Unable to perform task", command + ' ' + task], err, { type: 4, startTime }));
|
|
121
121
|
}
|
|
122
122
|
};
|
package/index.js
CHANGED
|
@@ -4,29 +4,6 @@ const path = require("path");
|
|
|
4
4
|
const types_1 = require("@e-mc/types");
|
|
5
5
|
const Document = require('@e-mc/document');
|
|
6
6
|
class AndroidDocument extends Document {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.config = {
|
|
10
|
-
mainParentDir: 'app',
|
|
11
|
-
mainSrcDir: 'src/main',
|
|
12
|
-
mainActivityFile: '',
|
|
13
|
-
javaVersion: 0,
|
|
14
|
-
dataBinding: false,
|
|
15
|
-
projectName: undefined,
|
|
16
|
-
versionName: undefined,
|
|
17
|
-
versionCode: 0,
|
|
18
|
-
manifest: undefined,
|
|
19
|
-
namespace: undefined,
|
|
20
|
-
profileable: undefined,
|
|
21
|
-
dependencies: undefined,
|
|
22
|
-
dependencyScopes: undefined,
|
|
23
|
-
commands: undefined
|
|
24
|
-
};
|
|
25
|
-
this.elements = [];
|
|
26
|
-
this.extensionData = {};
|
|
27
|
-
this._moduleName = 'android';
|
|
28
|
-
this._threadable = true;
|
|
29
|
-
}
|
|
30
7
|
static async finalize(instance) {
|
|
31
8
|
if (instance.aborted) {
|
|
32
9
|
return Promise.reject((0, types_1.createAbortError)());
|
|
@@ -53,9 +30,32 @@ class AndroidDocument extends Document {
|
|
|
53
30
|
}
|
|
54
31
|
return super.finalize.call(this, instance);
|
|
55
32
|
}
|
|
33
|
+
config = {
|
|
34
|
+
mainParentDir: 'app',
|
|
35
|
+
mainSrcDir: 'src/main',
|
|
36
|
+
mainActivityFile: '',
|
|
37
|
+
javaVersion: 0,
|
|
38
|
+
dataBinding: false,
|
|
39
|
+
projectName: undefined,
|
|
40
|
+
versionName: undefined,
|
|
41
|
+
versionCode: 0,
|
|
42
|
+
manifest: undefined,
|
|
43
|
+
namespace: undefined,
|
|
44
|
+
applicationId: undefined,
|
|
45
|
+
profileable: undefined,
|
|
46
|
+
dependencies: undefined,
|
|
47
|
+
dependencyScopes: undefined,
|
|
48
|
+
commands: undefined
|
|
49
|
+
};
|
|
50
|
+
elements = [];
|
|
51
|
+
extensionData = {};
|
|
52
|
+
targetAPI;
|
|
53
|
+
directories;
|
|
54
|
+
_moduleName = 'android';
|
|
55
|
+
_threadable = true;
|
|
56
56
|
init(assets, config) {
|
|
57
57
|
if (config) {
|
|
58
|
-
const { targetAPI, mainParentDir, mainSrcDir, mainActivityFile, javaVersion, projectName, versionName, versionCode = 0, manifest, namespace, profileable, dependencies, dependencyScopes, dataBinding, commands, directories, elements, extensionData } = config;
|
|
58
|
+
const { targetAPI, mainParentDir, mainSrcDir, mainActivityFile, javaVersion, projectName, versionName, versionCode = 0, manifest, namespace, applicationId, profileable, dependencies, dependencyScopes, dataBinding, commands, directories, elements, extensionData } = config;
|
|
59
59
|
const target = this.config;
|
|
60
60
|
if (projectName) {
|
|
61
61
|
target.projectName = projectName;
|
|
@@ -63,6 +63,9 @@ class AndroidDocument extends Document {
|
|
|
63
63
|
if (namespace) {
|
|
64
64
|
target.namespace = namespace;
|
|
65
65
|
}
|
|
66
|
+
if (applicationId) {
|
|
67
|
+
target.applicationId = applicationId;
|
|
68
|
+
}
|
|
66
69
|
if (mainParentDir) {
|
|
67
70
|
target.mainParentDir = mainParentDir;
|
|
68
71
|
}
|
|
@@ -150,14 +153,16 @@ class AndroidDocument extends Document {
|
|
|
150
153
|
const instance = host.loadModule('compress');
|
|
151
154
|
const buffer = host.getBuffer(file);
|
|
152
155
|
if (instance && buffer) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
else if ((0, types_1.isString)(result)) {
|
|
159
|
-
host.replace(file, result);
|
|
156
|
+
const options = { format: 'ttf', etag: file.etag };
|
|
157
|
+
await instance.tryFile(buffer, localUri, options)
|
|
158
|
+
.then(() => {
|
|
159
|
+
if (options.outFile) {
|
|
160
|
+
host.replace(file, options.outFile);
|
|
160
161
|
}
|
|
162
|
+
})
|
|
163
|
+
.catch((err) => {
|
|
164
|
+
host.deleteFile(localUri);
|
|
165
|
+
host.writeFail("Unable to compress file", err, 8);
|
|
161
166
|
});
|
|
162
167
|
}
|
|
163
168
|
break;
|
|
@@ -227,8 +232,7 @@ class AndroidDocument extends Document {
|
|
|
227
232
|
return null;
|
|
228
233
|
}
|
|
229
234
|
get settings() {
|
|
230
|
-
|
|
231
|
-
return (_a = this.module).settings || (_a.settings = {});
|
|
235
|
+
return this.module.settings ||= {};
|
|
232
236
|
}
|
|
233
237
|
}
|
|
234
238
|
module.exports = AndroidDocument;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/android",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Android document constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/document": "^0.
|
|
24
|
-
"@e-mc/types": "^0.
|
|
23
|
+
"@e-mc/document": "^0.9.0",
|
|
24
|
+
"@e-mc/types": "^0.9.0",
|
|
25
25
|
"htmlparser2": "^9.1.0",
|
|
26
26
|
"which": "^2.0.2"
|
|
27
27
|
}
|
|
@@ -37,7 +37,7 @@ android {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
dependencies {
|
|
40
|
-
implementation 'androidx.core:core-ktx:1.
|
|
40
|
+
implementation 'androidx.core:core-ktx:1.13.0'
|
|
41
41
|
testImplementation 'junit:junit:4.13.2'
|
|
42
42
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
43
43
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
plugins {
|
|
2
|
-
id 'com.android.application' version '8.3.
|
|
3
|
-
id 'com.android.library' version '8.3.
|
|
2
|
+
id 'com.android.application' version '8.3.2' apply false
|
|
3
|
+
id 'com.android.library' version '8.3.2' apply false
|
|
4
4
|
id 'org.jetbrains.kotlin.android' version '1.9.23' apply false
|
|
5
5
|
}
|
|
@@ -39,7 +39,7 @@ java {
|
|
|
39
39
|
|
|
40
40
|
dependencies {
|
|
41
41
|
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.23")
|
|
42
|
-
implementation("androidx.core:core-ktx:1.
|
|
42
|
+
implementation("androidx.core:core-ktx:1.13.0")
|
|
43
43
|
testImplementation("junit:junit:4.13.2")
|
|
44
44
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
|
45
45
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
plugins {
|
|
2
|
-
id("com.android.application") version "8.3.
|
|
3
|
-
id("com.android.library") version "8.3.
|
|
2
|
+
id("com.android.application") version "8.3.2" apply false
|
|
3
|
+
id("com.android.library") version "8.3.2" apply false
|
|
4
4
|
id("org.jetbrains.kotlin.android") version "1.9.23" apply false
|
|
5
5
|
}
|
package/types/squared.d.ts
CHANGED
|
@@ -3,29 +3,30 @@ import type { FinalizedElement, ControllerSettingsDirectoryUI as IControllerSett
|
|
|
3
3
|
import type { RequestData as IRequestData } from '@e-mc/types/lib/node';
|
|
4
4
|
|
|
5
5
|
export interface DocumentOutput {
|
|
6
|
-
targetAPI?:
|
|
6
|
+
targetAPI?: number | string;
|
|
7
7
|
manifest?: ManifestData;
|
|
8
8
|
namespace?: string;
|
|
9
|
-
|
|
9
|
+
applicationId?: string;
|
|
10
|
+
profileable?: boolean | ArrayOf<string>;
|
|
10
11
|
dependencies?: string[];
|
|
11
|
-
dependencyScopes?: boolean | ArrayOf<DependencyScopes | "snapshot">;
|
|
12
|
+
dependencyScopes?: boolean | 1 | ArrayOf<DependencyScopes | "snapshot">;
|
|
12
13
|
directories?: ControllerSettingsDirectoryUI;
|
|
13
14
|
elements?: FinalizedElement[];
|
|
14
15
|
projectName?: string;
|
|
15
16
|
mainParentDir?: string;
|
|
16
17
|
mainSrcDir?: string;
|
|
17
18
|
mainActivityFile?: string;
|
|
18
|
-
javaVersion?:
|
|
19
|
+
javaVersion?: number | string;
|
|
19
20
|
versionName?: string;
|
|
20
21
|
versionCode?: number;
|
|
21
22
|
dataBinding?: boolean;
|
|
22
|
-
commands?: ArrayOf<
|
|
23
|
+
commands?: ArrayOf<ArrayOf<string>>;
|
|
23
24
|
extensionData?: PlainObject;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export interface RequestData extends IRequestData, DocumentOutput {}
|
|
27
28
|
|
|
28
|
-
export interface ManifestData {
|
|
29
|
+
export interface ManifestData extends PlainObject {
|
|
29
30
|
package?: string;
|
|
30
31
|
application?: {
|
|
31
32
|
supportsRtl?: boolean;
|