@pi-r/android 0.11.0 → 0.11.2
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/data/google-maven-snapshot.json +1 -1
- package/data/google-maven.json +1 -1
- package/extensions/gradle/dependencies/index.js +8 -12
- package/package.json +4 -4
- package/project/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/template/java/static/build.gradle +2 -2
- package/template/java+kotlin/libs.versions.toml +3 -3
- package/template/java+kotlin/static/gradle.properties +1 -1
- package/template/kotlin/libs.versions.toml +3 -3
- package/template/kotlin/static/gradle.properties +1 -1
|
@@ -10,7 +10,7 @@ const REGEXP_DEPENDENCY = /([ \t]*)([A-Za-z_$][\w$]*)(?:\s*\(?\s*(?:module\(?\s*
|
|
|
10
10
|
const REGEXP_DEPENDENCY_KOTLIN = /([ \t]*)([A-Za-z_$][\w$]*)\((?:\s*(?:(?:module\(\s*)?"([^"]+)"|((?:\s*(?:group|name|version)\s*=\s*"(?:[^"]|(?<=\\)")+"\s*,?){3}))\s*\))?/gd;
|
|
11
11
|
const REGEXP_LIBRARY = /([ \t]*)implementation\s+(?:(project|files)\s*\(\s*("(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+')\s*\)|(fileTree)\s*\(\s*((?:\s*(?:dir|include)\s*:\s*(?:"(?:[^"]|(?<=\\)")+"|'(?:[^']|(?<=\\)')+'|\[[^\]]+\])\s*,?){2})\s*\))[ \t\r]*\n/gd;
|
|
12
12
|
const REGEXP_LIBRARY_KOTLIN = /([ \t]*)implementation\(\s*(?:(project|files)\(\s*"(.+)"\s*\)|(fileTree)\(\s*mapOf\(((?:\s*"(?:dir|include)"\s+to\s+(?:"(?:[^"]|(?<=\\)")+"|listOf\([^)]+\))\s*,?){2})\)\s*\))\s*\)[ \t\r]*\n/gd;
|
|
13
|
-
const REGEXP_VERSIONS = /([^\s]+)\s*=\s*(?:"([^"
|
|
13
|
+
const REGEXP_VERSIONS = /([^\s]+)\s*=\s*(?:"([^"]+)"|'([^']+)'|(\{(?:\s*(?:require|strictly|prefer|reject(?:All)?)\s*=\s*(?:"[^"]+"|'[^']+')\s*,?)+\s*\}))/g;
|
|
14
14
|
const REGEXP_VERSIONS_LIB = /([^\s]+)\s*=\s*(?:\{\s*(group|name|module|version(?:\.ref)?)\s*=\s*(?:"([^"]+)"|'([^']+)'|(\{[^}]+\}))\s*,\s*(group|name|module|version(?:\.ref)?)\s*=\s*(?:"([^"]+)"|'([^']+)'|(\{[^}]+\}))(?:\s*,\s*(group|name|module|version(?:\.ref)?)\s*=\s*(?:"([^"]+)"|'([^']+)')|(\{[^}]+\}))?\s*\}|(?:"([^:]+:[^"]+)"|'([^:]+:[^']+)'))/gd;
|
|
15
15
|
function isUpgrade(version, pending) {
|
|
16
16
|
if (isSemVer(pending)) {
|
|
@@ -98,6 +98,7 @@ function writeMethod(kotlin, named, item, args = '', prefix = 'implementation')
|
|
|
98
98
|
}
|
|
99
99
|
const isLatest = (value) => value === '' || value.startsWith('latest.');
|
|
100
100
|
const isSemVer = (value) => isLatest(value) || REGEXP_SEMVER.test(value);
|
|
101
|
+
const writeOutput = (match, source, value) => (0, util_1.spliceString)(source, match.index, match.index + match[0].length, value);
|
|
101
102
|
const toCamelCase = (value) => value.replace(/-([a-z])/gi, (...capture) => capture[1].toUpperCase());
|
|
102
103
|
function finalize(instance) {
|
|
103
104
|
const { profileable, dependencies, libraries, dataBinding, jvmToolchain, versionName, versionCode, namespace, applicationId, mainParentDir } = instance.config;
|
|
@@ -339,22 +340,17 @@ function finalize(instance) {
|
|
|
339
340
|
item[2] = '';
|
|
340
341
|
libs[key] = { group, name, "version.ref": versionRef };
|
|
341
342
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
config = writeOutput(output);
|
|
343
|
+
const lib = /\[libraries\]\s*/.exec(config);
|
|
344
|
+
if (lib) {
|
|
345
|
+
config = writeOutput(lib, config, output);
|
|
346
346
|
}
|
|
347
347
|
else {
|
|
348
348
|
config += output;
|
|
349
349
|
}
|
|
350
350
|
if (outputVer) {
|
|
351
351
|
outputVer = '[versions]' + newLine + outputVer;
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
else {
|
|
356
|
-
config = outputVer + newLine + config;
|
|
357
|
-
}
|
|
352
|
+
const ver = /\[versions\]\s*/.exec(config);
|
|
353
|
+
config = ver ? writeOutput(ver, config, outputVer) : outputVer + newLine + config;
|
|
358
354
|
}
|
|
359
355
|
REGEXP_VERSIONS.lastIndex = 0;
|
|
360
356
|
}
|
|
@@ -434,7 +430,7 @@ function finalize(instance) {
|
|
|
434
430
|
output = Document.updateGradle(output, ['android', 'buildFeatures'], 'compose = true');
|
|
435
431
|
}
|
|
436
432
|
else {
|
|
437
|
-
const stdLib = instance.findVersion('org.jetbrains.kotlin:kotlin-stdlib', "2.2.
|
|
433
|
+
const stdLib = instance.findVersion('org.jetbrains.kotlin:kotlin-stdlib', "2.2.21");
|
|
438
434
|
output = Document.updateGradle(output, ['plugins'], "id 'org.jetbrains.kotlin.android'", { upgrade: true, multiple: true, addendum: `version '${stdLib}'` });
|
|
439
435
|
output = Document.updateGradle(output, ['android', 'buildFeatures'], "compose true");
|
|
440
436
|
if (stdLib.startsWith('1.')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/android",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Android document constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/document": "^0.13.
|
|
24
|
-
"@e-mc/types": "^0.13.
|
|
23
|
+
"@e-mc/document": "^0.13.9",
|
|
24
|
+
"@e-mc/types": "^0.13.9",
|
|
25
25
|
"dom-serializer": "^2.0.0",
|
|
26
26
|
"domhandler": "^5.0.3",
|
|
27
27
|
"domutils": "^3.2.2",
|
|
28
|
-
"htmlparser2": "^10.
|
|
28
|
+
"htmlparser2": "^10.1.0",
|
|
29
29
|
"which": "^4.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
2
2
|
|
|
3
3
|
org.gradle.configuration-cache=true
|
|
4
|
-
# org.gradle.jvmargs=-Xmx2048m
|
|
4
|
+
# org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|
5
5
|
# org.gradle.caching=false
|
|
6
6
|
# org.gradle.continue=false
|
|
7
7
|
# org.gradle.daemon=true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
2
2
|
|
|
3
3
|
org.gradle.configuration-cache=true
|
|
4
|
-
# org.gradle.jvmargs=-Xmx2048m
|
|
4
|
+
# org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|
5
5
|
# org.gradle.caching=false
|
|
6
6
|
# org.gradle.continue=false
|
|
7
7
|
# org.gradle.daemon=true
|