@pi-r/android 0.5.4 → 0.5.6
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/LICENSE +6 -6
- package/README.md +4 -6
- package/extensions/gradle/dependencies/index.js +2 -2
- package/index.d.ts +6 -6
- package/package.json +31 -28
- package/template/AndroidManifest.xml +24 -24
- package/template/java/build.gradle +38 -38
- package/template/java/settings.gradle +17 -17
- package/template/java/static/build.gradle +3 -3
- package/template/java+kotlin/build.gradle +43 -43
- package/template/java+kotlin/settings.gradle +17 -17
- package/template/java+kotlin/static/build.gradle +4 -4
- package/template/kotlin/build.gradle.kts +45 -45
- package/template/kotlin/settings.gradle.kts +17 -17
- package/template/kotlin/static/build.gradle.kts +4 -4
- package/types/index.d.ts +76 -76
- package/types/squared.d.ts +55 -55
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Copyright
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
1
|
+
Copyright 2023 An Pham
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
7
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -271,9 +271,9 @@ function finalize(instance) {
|
|
|
271
271
|
output = Document.updateGradle(output, ['android', 'buildFeatures'], 'compose = true');
|
|
272
272
|
}
|
|
273
273
|
else {
|
|
274
|
-
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.
|
|
274
|
+
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.24")}'` });
|
|
275
275
|
output = Document.updateGradle(output, ['android', 'buildFeatures'], "compose true");
|
|
276
|
-
output = Document.updateGradle(output, ['android', 'composeOptions'], `kotlinCompilerExtensionVersion '${instance.findVersion('kotlinCompilerExtensionVersion', "1.5.
|
|
276
|
+
output = Document.updateGradle(output, ['android', 'composeOptions'], `kotlinCompilerExtensionVersion '${instance.findVersion('kotlinCompilerExtensionVersion', "1.5.14")}'`, true);
|
|
277
277
|
if (upgrade) {
|
|
278
278
|
output = Document.updateGradle(output, ['android', 'kotlinOptions'], `jvmTarget = '${javaVersion}'`, true);
|
|
279
279
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IFileManager } from '@e-mc/types/lib';
|
|
2
|
-
|
|
3
|
-
import type { AndroidDocumentConstructor, DocumentAsset } from './types';
|
|
4
|
-
|
|
5
|
-
declare const Android: AndroidDocumentConstructor<IFileManager<DocumentAsset>>;
|
|
6
|
-
|
|
1
|
+
import type { IFileManager } from '@e-mc/types/lib';
|
|
2
|
+
|
|
3
|
+
import type { AndroidDocumentConstructor, DocumentAsset } from './types';
|
|
4
|
+
|
|
5
|
+
declare const Android: AndroidDocumentConstructor<IFileManager<DocumentAsset>>;
|
|
6
|
+
|
|
7
7
|
export = Android;
|
package/package.json
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pi-r/android",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "Android document constructor for E-mc.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
|
-
"directory": "src/module/android"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"squared",
|
|
16
|
-
"e-mc",
|
|
17
|
-
"squared-functions"
|
|
18
|
-
],
|
|
19
|
-
"author": "An Pham <anpham6@gmail.com>",
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@e-mc/document": "^0.7.
|
|
24
|
-
"@e-mc/types": "^0.7.
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@pi-r/android",
|
|
3
|
+
"version": "0.5.6",
|
|
4
|
+
"description": "Android document constructor for E-mc.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
|
+
"directory": "src/module/android"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"squared",
|
|
16
|
+
"e-mc",
|
|
17
|
+
"squared-functions"
|
|
18
|
+
],
|
|
19
|
+
"author": "An Pham <anpham6@gmail.com>",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@e-mc/document": "^0.7.20",
|
|
24
|
+
"@e-mc/types": "^0.7.20",
|
|
25
|
+
"dom-serializer": "^2.0.0",
|
|
26
|
+
"domhandler": "^5.0.3",
|
|
27
|
+
"domutils": "^3.1.0",
|
|
28
|
+
"htmlparser2": "^9.1.0",
|
|
29
|
+
"which": "^2.0.2"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
-
|
|
4
|
-
<application
|
|
5
|
-
android:allowBackup="true"
|
|
6
|
-
android:icon="@mipmap/ic_launcher"
|
|
7
|
-
android:label="{{label}}"
|
|
8
|
-
android:roundIcon="@mipmap/ic_launcher_round"
|
|
9
|
-
android:supportsRtl="{{supportsRtl}}"
|
|
10
|
-
android:theme="{{theme}}">
|
|
11
|
-
<activity
|
|
12
|
-
android:name="{{activityName}}"
|
|
13
|
-
android:exported="true"
|
|
14
|
-
android:label="{{label}}"
|
|
15
|
-
android:theme="{{theme}}">
|
|
16
|
-
<intent-filter>
|
|
17
|
-
<action android:name="android.intent.action.MAIN" />
|
|
18
|
-
|
|
19
|
-
<category android:name="android.intent.category.LAUNCHER" />
|
|
20
|
-
</intent-filter>
|
|
21
|
-
</activity>
|
|
22
|
-
<profileable android:shell="true" android:enabled="{{profileable}}" />
|
|
23
|
-
</application>
|
|
24
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
+
|
|
4
|
+
<application
|
|
5
|
+
android:allowBackup="true"
|
|
6
|
+
android:icon="@mipmap/ic_launcher"
|
|
7
|
+
android:label="{{label}}"
|
|
8
|
+
android:roundIcon="@mipmap/ic_launcher_round"
|
|
9
|
+
android:supportsRtl="{{supportsRtl}}"
|
|
10
|
+
android:theme="{{theme}}">
|
|
11
|
+
<activity
|
|
12
|
+
android:name="{{activityName}}"
|
|
13
|
+
android:exported="true"
|
|
14
|
+
android:label="{{label}}"
|
|
15
|
+
android:theme="{{theme}}">
|
|
16
|
+
<intent-filter>
|
|
17
|
+
<action android:name="android.intent.action.MAIN" />
|
|
18
|
+
|
|
19
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
|
20
|
+
</intent-filter>
|
|
21
|
+
</activity>
|
|
22
|
+
<profileable android:shell="true" android:enabled="{{profileable}}" />
|
|
23
|
+
</application>
|
|
24
|
+
|
|
25
25
|
</manifest>
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id 'com.android.application'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
android {
|
|
6
|
-
namespace ''
|
|
7
|
-
compileSdk 34
|
|
8
|
-
|
|
9
|
-
defaultConfig {
|
|
10
|
-
applicationId ''
|
|
11
|
-
minSdk 21
|
|
12
|
-
targetSdk 34
|
|
13
|
-
versionCode 1
|
|
14
|
-
versionName '1.0'
|
|
15
|
-
|
|
16
|
-
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
17
|
-
}
|
|
18
|
-
buildTypes {
|
|
19
|
-
release {
|
|
20
|
-
debuggable false
|
|
21
|
-
minifyEnabled true
|
|
22
|
-
shrinkResources false
|
|
23
|
-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
compileOptions {
|
|
27
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
28
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
29
|
-
}
|
|
30
|
-
buildFeatures {
|
|
31
|
-
viewBinding false
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
dependencies {
|
|
36
|
-
testImplementation 'junit:junit:4.13.2'
|
|
37
|
-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
38
|
-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.application'
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
android {
|
|
6
|
+
namespace ''
|
|
7
|
+
compileSdk 34
|
|
8
|
+
|
|
9
|
+
defaultConfig {
|
|
10
|
+
applicationId ''
|
|
11
|
+
minSdk 21
|
|
12
|
+
targetSdk 34
|
|
13
|
+
versionCode 1
|
|
14
|
+
versionName '1.0'
|
|
15
|
+
|
|
16
|
+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
17
|
+
}
|
|
18
|
+
buildTypes {
|
|
19
|
+
release {
|
|
20
|
+
debuggable false
|
|
21
|
+
minifyEnabled true
|
|
22
|
+
shrinkResources false
|
|
23
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
compileOptions {
|
|
27
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
28
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
29
|
+
}
|
|
30
|
+
buildFeatures {
|
|
31
|
+
viewBinding false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
dependencies {
|
|
36
|
+
testImplementation 'junit:junit:4.13.2'
|
|
37
|
+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
38
|
+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
39
39
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
pluginManagement {
|
|
2
|
-
repositories {
|
|
3
|
-
google()
|
|
4
|
-
mavenCentral()
|
|
5
|
-
gradlePluginPortal()
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
dependencyResolutionManagement {
|
|
10
|
-
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
11
|
-
repositories {
|
|
12
|
-
google()
|
|
13
|
-
mavenCentral()
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
rootProject.name = '{{projectName}}'
|
|
1
|
+
pluginManagement {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
gradlePluginPortal()
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
dependencyResolutionManagement {
|
|
10
|
+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
11
|
+
repositories {
|
|
12
|
+
google()
|
|
13
|
+
mavenCentral()
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
rootProject.name = '{{projectName}}'
|
|
18
18
|
include '{{name}}'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id 'com.android.application' version '8.2.0' apply false
|
|
3
|
-
id 'com.android.library' version '8.2.0' apply false
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.application' version '8.2.0' apply false
|
|
3
|
+
id 'com.android.library' version '8.2.0' apply false
|
|
4
4
|
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id 'com.android.application'
|
|
3
|
-
id 'org.jetbrains.kotlin.android'
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
android {
|
|
7
|
-
namespace ''
|
|
8
|
-
compileSdk 34
|
|
9
|
-
|
|
10
|
-
defaultConfig {
|
|
11
|
-
applicationId ''
|
|
12
|
-
minSdk 21
|
|
13
|
-
targetSdk 34
|
|
14
|
-
versionCode 1
|
|
15
|
-
versionName '1.0'
|
|
16
|
-
|
|
17
|
-
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
18
|
-
}
|
|
19
|
-
buildTypes {
|
|
20
|
-
release {
|
|
21
|
-
debuggable false
|
|
22
|
-
minifyEnabled true
|
|
23
|
-
shrinkResources false
|
|
24
|
-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
compileOptions {
|
|
28
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
29
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
30
|
-
}
|
|
31
|
-
kotlinOptions {
|
|
32
|
-
jvmTarget = '1.8'
|
|
33
|
-
}
|
|
34
|
-
buildFeatures {
|
|
35
|
-
viewBinding false
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
dependencies {
|
|
40
|
-
implementation 'androidx.core:core-ktx:1.12.0'
|
|
41
|
-
testImplementation 'junit:junit:4.13.2'
|
|
42
|
-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
43
|
-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.application'
|
|
3
|
+
id 'org.jetbrains.kotlin.android'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
android {
|
|
7
|
+
namespace ''
|
|
8
|
+
compileSdk 34
|
|
9
|
+
|
|
10
|
+
defaultConfig {
|
|
11
|
+
applicationId ''
|
|
12
|
+
minSdk 21
|
|
13
|
+
targetSdk 34
|
|
14
|
+
versionCode 1
|
|
15
|
+
versionName '1.0'
|
|
16
|
+
|
|
17
|
+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
18
|
+
}
|
|
19
|
+
buildTypes {
|
|
20
|
+
release {
|
|
21
|
+
debuggable false
|
|
22
|
+
minifyEnabled true
|
|
23
|
+
shrinkResources false
|
|
24
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
compileOptions {
|
|
28
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
29
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
30
|
+
}
|
|
31
|
+
kotlinOptions {
|
|
32
|
+
jvmTarget = '1.8'
|
|
33
|
+
}
|
|
34
|
+
buildFeatures {
|
|
35
|
+
viewBinding false
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
dependencies {
|
|
40
|
+
implementation 'androidx.core:core-ktx:1.12.0'
|
|
41
|
+
testImplementation 'junit:junit:4.13.2'
|
|
42
|
+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
43
|
+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
44
44
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
pluginManagement {
|
|
2
|
-
repositories {
|
|
3
|
-
google()
|
|
4
|
-
mavenCentral()
|
|
5
|
-
gradlePluginPortal()
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
dependencyResolutionManagement {
|
|
10
|
-
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
11
|
-
repositories {
|
|
12
|
-
google()
|
|
13
|
-
mavenCentral()
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
rootProject.name = '{{projectName}}'
|
|
1
|
+
pluginManagement {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
gradlePluginPortal()
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
dependencyResolutionManagement {
|
|
10
|
+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
11
|
+
repositories {
|
|
12
|
+
google()
|
|
13
|
+
mavenCentral()
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
rootProject.name = '{{projectName}}'
|
|
18
18
|
include '{{name}}'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id 'com.android.application' version '8.2.0' apply false
|
|
3
|
-
id 'com.android.library' version '8.2.0' apply false
|
|
4
|
-
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.application' version '8.2.0' apply false
|
|
3
|
+
id 'com.android.library' version '8.2.0' apply false
|
|
4
|
+
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
|
|
5
5
|
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id("com.android.application")
|
|
3
|
-
id("org.jetbrains.kotlin.android")
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
android {
|
|
7
|
-
namespace = ""
|
|
8
|
-
compileSdk = 34
|
|
9
|
-
|
|
10
|
-
defaultConfig {
|
|
11
|
-
applicationId = ""
|
|
12
|
-
minSdk = 21
|
|
13
|
-
targetSdk = 34
|
|
14
|
-
versionCode = 1
|
|
15
|
-
versionName = "1.0"
|
|
16
|
-
|
|
17
|
-
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
18
|
-
}
|
|
19
|
-
buildTypes {
|
|
20
|
-
release {
|
|
21
|
-
isDebuggable = false
|
|
22
|
-
isMinifyEnabled = true
|
|
23
|
-
isShrinkResources = false
|
|
24
|
-
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
kotlinOptions {
|
|
28
|
-
jvmTarget = "1.8"
|
|
29
|
-
}
|
|
30
|
-
buildFeatures {
|
|
31
|
-
viewBinding = true
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
java {
|
|
36
|
-
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
37
|
-
targetCompatibility = JavaVersion.VERSION_1_8
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
dependencies {
|
|
41
|
-
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.
|
|
42
|
-
implementation("androidx.core:core-ktx:1.12.0")
|
|
43
|
-
testImplementation("junit:junit:4.13.2")
|
|
44
|
-
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
|
45
|
-
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
|
1
|
+
plugins {
|
|
2
|
+
id("com.android.application")
|
|
3
|
+
id("org.jetbrains.kotlin.android")
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
android {
|
|
7
|
+
namespace = ""
|
|
8
|
+
compileSdk = 34
|
|
9
|
+
|
|
10
|
+
defaultConfig {
|
|
11
|
+
applicationId = ""
|
|
12
|
+
minSdk = 21
|
|
13
|
+
targetSdk = 34
|
|
14
|
+
versionCode = 1
|
|
15
|
+
versionName = "1.0"
|
|
16
|
+
|
|
17
|
+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
18
|
+
}
|
|
19
|
+
buildTypes {
|
|
20
|
+
release {
|
|
21
|
+
isDebuggable = false
|
|
22
|
+
isMinifyEnabled = true
|
|
23
|
+
isShrinkResources = false
|
|
24
|
+
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
kotlinOptions {
|
|
28
|
+
jvmTarget = "1.8"
|
|
29
|
+
}
|
|
30
|
+
buildFeatures {
|
|
31
|
+
viewBinding = true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
java {
|
|
36
|
+
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
37
|
+
targetCompatibility = JavaVersion.VERSION_1_8
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
dependencies {
|
|
41
|
+
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.24")
|
|
42
|
+
implementation("androidx.core:core-ktx:1.12.0")
|
|
43
|
+
testImplementation("junit:junit:4.13.2")
|
|
44
|
+
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
|
45
|
+
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
|
46
46
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
pluginManagement {
|
|
2
|
-
repositories {
|
|
3
|
-
google()
|
|
4
|
-
mavenCentral()
|
|
5
|
-
gradlePluginPortal()
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
dependencyResolutionManagement {
|
|
10
|
-
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
11
|
-
repositories {
|
|
12
|
-
google()
|
|
13
|
-
mavenCentral()
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
rootProject.name = "{{projectName}}"
|
|
1
|
+
pluginManagement {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
gradlePluginPortal()
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
dependencyResolutionManagement {
|
|
10
|
+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
11
|
+
repositories {
|
|
12
|
+
google()
|
|
13
|
+
mavenCentral()
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
rootProject.name = "{{projectName}}"
|
|
18
18
|
include("{{name}}")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id("com.android.application") version "8.2.0" apply false
|
|
3
|
-
id("com.android.library") version "8.2.0" apply false
|
|
4
|
-
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
|
|
1
|
+
plugins {
|
|
2
|
+
id("com.android.application") version "8.2.0" apply false
|
|
3
|
+
id("com.android.library") version "8.2.0" apply false
|
|
4
|
+
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
|
|
5
5
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import type { FinalizedElement } from '@e-mc/types/lib/squared';
|
|
2
|
-
|
|
3
|
-
import type { DocumentConstructor, IDocument, IFileManager } from '@e-mc/types/lib';
|
|
4
|
-
import type { ExternalAsset } from '@e-mc/types/lib/asset';
|
|
5
|
-
import type { DocumentModule as IDocumentModule, DocumentSettings as IDocumentSettings, ExecAction } from '@e-mc/types/lib/settings';
|
|
6
|
-
|
|
7
|
-
import type { DocumentOutput, MavenScopes } from './squared';
|
|
8
|
-
|
|
9
|
-
interface DocumentDirectory extends IDocumentDirectory {
|
|
10
|
-
template?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface AndroidDocumentSettings extends Pick<IDocumentSettings, "users" | "directory">, PlainObject {
|
|
14
|
-
extensions?: {
|
|
15
|
-
task?: {
|
|
16
|
-
exec?: ExecAction;
|
|
17
|
-
command?: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
language?: {
|
|
21
|
-
gradle?: "java" | "kotlin" | "java+kotlin";
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type LanguageType = "gradle";
|
|
26
|
-
type DocumentProperties = "targetAPI" | "elements" | "extensionData" | "directories";
|
|
27
|
-
|
|
28
|
-
export interface UserConfig extends Omit<DocumentOutput, DocumentProperties> {
|
|
29
|
-
mainParentDir: string;
|
|
30
|
-
mainSrcDir: string;
|
|
31
|
-
mainActivityFile: string;
|
|
32
|
-
javaVersion: number;
|
|
33
|
-
dataBinding: boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface DocumentModule extends IDocumentModule {
|
|
37
|
-
settings?: AndroidDocumentSettings;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface TemplateData {
|
|
41
|
-
localUri?: string;
|
|
42
|
-
source?: string;
|
|
43
|
-
existing?: boolean;
|
|
44
|
-
kotlin?: boolean;
|
|
45
|
-
language?: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface FindTemplateOptions {
|
|
49
|
-
detect?: boolean;
|
|
50
|
-
languageOf?: LanguageType;
|
|
51
|
-
subDir?: ArrayOf<string>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface MavenArtifact {
|
|
55
|
-
groupId: string;
|
|
56
|
-
artifactId: string;
|
|
57
|
-
version: string;
|
|
58
|
-
scope?: MavenScopes;
|
|
59
|
-
dependencies?: MavenArtifact[];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface IAndroidDocument<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends IDocument<T, U>, Pick<DocumentOutput, DocumentProperties> {
|
|
63
|
-
config: UserConfig;
|
|
64
|
-
elements: FinalizedElement[];
|
|
65
|
-
extensionData: PlainObject;
|
|
66
|
-
findTemplate(baseDir: string, filename: string, options?: FindTemplateOptions): TemplateData;
|
|
67
|
-
findData<V = AnyObject>(filename: string, format?: string): Null<V>;
|
|
68
|
-
detectKts(...paths: string[]): Null<boolean>;
|
|
69
|
-
get settings(): AndroidDocumentSettings;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface AndroidDocumentConstructor<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends DocumentConstructor<T, U> {
|
|
73
|
-
readonly prototype: IAndroidDocument<T, U>;
|
|
74
|
-
new(module?: DocumentModule, ...args: unknown[]): IAndroidDocument<T, U>;
|
|
75
|
-
}
|
|
76
|
-
|
|
1
|
+
import type { FinalizedElement } from '@e-mc/types/lib/squared';
|
|
2
|
+
|
|
3
|
+
import type { DocumentConstructor, IDocument, IFileManager } from '@e-mc/types/lib';
|
|
4
|
+
import type { ExternalAsset } from '@e-mc/types/lib/asset';
|
|
5
|
+
import type { DocumentModule as IDocumentModule, DocumentSettings as IDocumentSettings, ExecAction } from '@e-mc/types/lib/settings';
|
|
6
|
+
|
|
7
|
+
import type { DocumentOutput, MavenScopes } from './squared';
|
|
8
|
+
|
|
9
|
+
interface DocumentDirectory extends IDocumentDirectory {
|
|
10
|
+
template?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface AndroidDocumentSettings extends Pick<IDocumentSettings, "users" | "directory">, PlainObject {
|
|
14
|
+
extensions?: {
|
|
15
|
+
task?: {
|
|
16
|
+
exec?: ExecAction;
|
|
17
|
+
command?: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
language?: {
|
|
21
|
+
gradle?: "java" | "kotlin" | "java+kotlin";
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type LanguageType = "gradle";
|
|
26
|
+
type DocumentProperties = "targetAPI" | "elements" | "extensionData" | "directories";
|
|
27
|
+
|
|
28
|
+
export interface UserConfig extends Omit<DocumentOutput, DocumentProperties> {
|
|
29
|
+
mainParentDir: string;
|
|
30
|
+
mainSrcDir: string;
|
|
31
|
+
mainActivityFile: string;
|
|
32
|
+
javaVersion: number;
|
|
33
|
+
dataBinding: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface DocumentModule extends IDocumentModule {
|
|
37
|
+
settings?: AndroidDocumentSettings;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface TemplateData {
|
|
41
|
+
localUri?: string;
|
|
42
|
+
source?: string;
|
|
43
|
+
existing?: boolean;
|
|
44
|
+
kotlin?: boolean;
|
|
45
|
+
language?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface FindTemplateOptions {
|
|
49
|
+
detect?: boolean;
|
|
50
|
+
languageOf?: LanguageType;
|
|
51
|
+
subDir?: ArrayOf<string>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface MavenArtifact {
|
|
55
|
+
groupId: string;
|
|
56
|
+
artifactId: string;
|
|
57
|
+
version: string;
|
|
58
|
+
scope?: MavenScopes;
|
|
59
|
+
dependencies?: MavenArtifact[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface IAndroidDocument<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends IDocument<T, U>, Pick<DocumentOutput, DocumentProperties> {
|
|
63
|
+
config: UserConfig;
|
|
64
|
+
elements: FinalizedElement[];
|
|
65
|
+
extensionData: PlainObject;
|
|
66
|
+
findTemplate(baseDir: string, filename: string, options?: FindTemplateOptions): TemplateData;
|
|
67
|
+
findData<V = AnyObject>(filename: string, format?: string): Null<V>;
|
|
68
|
+
detectKts(...paths: string[]): Null<boolean>;
|
|
69
|
+
get settings(): AndroidDocumentSettings;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface AndroidDocumentConstructor<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends DocumentConstructor<T, U> {
|
|
73
|
+
readonly prototype: IAndroidDocument<T, U>;
|
|
74
|
+
new(module?: DocumentModule, ...args: unknown[]): IAndroidDocument<T, U>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
77
|
export type DocumentAsset = ExternalAsset;
|
package/types/squared.d.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import type { FinalizedElement, ControllerSettingsDirectoryUI as IControllerSettingsDirectoryUI } from '@e-mc/types/lib/squared';
|
|
2
|
-
|
|
3
|
-
import type { ExternalAsset } from '@e-mc/types/lib/asset';
|
|
4
|
-
import type { RequestData as IRequestData } from '@e-mc/types/lib/node';
|
|
5
|
-
|
|
6
|
-
export interface DocumentOutput {
|
|
7
|
-
targetAPI?: NumString;
|
|
8
|
-
manifest?: ManifestData;
|
|
9
|
-
namespace?: string;
|
|
10
|
-
profileable?: boolean | StringOfArray;
|
|
11
|
-
dependencies?: string[];
|
|
12
|
-
dependencyScopes?: boolean | ArrayOf<DependencyScopes | "snapshot">;
|
|
13
|
-
directories?: ControllerSettingsDirectoryUI;
|
|
14
|
-
elements?: FinalizedElement[];
|
|
15
|
-
projectName?: string;
|
|
16
|
-
mainParentDir?: string;
|
|
17
|
-
mainSrcDir?: string;
|
|
18
|
-
mainActivityFile?: string;
|
|
19
|
-
javaVersion?: NumString;
|
|
20
|
-
versionName?: string;
|
|
21
|
-
versionCode?: number;
|
|
22
|
-
dataBinding?: boolean;
|
|
23
|
-
commands?: ArrayOf<StringOfArray>;
|
|
24
|
-
extensionData?: PlainObject;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface RequestData extends IRequestData<ExternalAsset>, DocumentOutput {}
|
|
28
|
-
|
|
29
|
-
export interface ManifestData {
|
|
30
|
-
package?: string;
|
|
31
|
-
application?: {
|
|
32
|
-
supportsRtl?: boolean;
|
|
33
|
-
label?: string;
|
|
34
|
-
theme?: string;
|
|
35
|
-
metaData?: { name?: string; resource?: string; value?: string }[];
|
|
36
|
-
activity?: ObjectMap<{
|
|
37
|
-
layout?: {
|
|
38
|
-
defaultWidth?: string;
|
|
39
|
-
defaultHeight?: string;
|
|
40
|
-
minWidth?: string;
|
|
41
|
-
minHeight?: string;
|
|
42
|
-
gravity?: string;
|
|
43
|
-
};
|
|
44
|
-
}>;
|
|
45
|
-
activityName?: string;
|
|
46
|
-
fontProvider?: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface ControllerSettingsDirectoryUI extends IControllerSettingsDirectoryUI {
|
|
51
|
-
main: string;
|
|
52
|
-
animation: string;
|
|
53
|
-
theme: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
1
|
+
import type { FinalizedElement, ControllerSettingsDirectoryUI as IControllerSettingsDirectoryUI } from '@e-mc/types/lib/squared';
|
|
2
|
+
|
|
3
|
+
import type { ExternalAsset } from '@e-mc/types/lib/asset';
|
|
4
|
+
import type { RequestData as IRequestData } from '@e-mc/types/lib/node';
|
|
5
|
+
|
|
6
|
+
export interface DocumentOutput {
|
|
7
|
+
targetAPI?: NumString;
|
|
8
|
+
manifest?: ManifestData;
|
|
9
|
+
namespace?: string;
|
|
10
|
+
profileable?: boolean | StringOfArray;
|
|
11
|
+
dependencies?: string[];
|
|
12
|
+
dependencyScopes?: boolean | ArrayOf<DependencyScopes | "snapshot">;
|
|
13
|
+
directories?: ControllerSettingsDirectoryUI;
|
|
14
|
+
elements?: FinalizedElement[];
|
|
15
|
+
projectName?: string;
|
|
16
|
+
mainParentDir?: string;
|
|
17
|
+
mainSrcDir?: string;
|
|
18
|
+
mainActivityFile?: string;
|
|
19
|
+
javaVersion?: NumString;
|
|
20
|
+
versionName?: string;
|
|
21
|
+
versionCode?: number;
|
|
22
|
+
dataBinding?: boolean;
|
|
23
|
+
commands?: ArrayOf<StringOfArray>;
|
|
24
|
+
extensionData?: PlainObject;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface RequestData extends IRequestData<ExternalAsset>, DocumentOutput {}
|
|
28
|
+
|
|
29
|
+
export interface ManifestData {
|
|
30
|
+
package?: string;
|
|
31
|
+
application?: {
|
|
32
|
+
supportsRtl?: boolean;
|
|
33
|
+
label?: string;
|
|
34
|
+
theme?: string;
|
|
35
|
+
metaData?: { name?: string; resource?: string; value?: string }[];
|
|
36
|
+
activity?: ObjectMap<{
|
|
37
|
+
layout?: {
|
|
38
|
+
defaultWidth?: string;
|
|
39
|
+
defaultHeight?: string;
|
|
40
|
+
minWidth?: string;
|
|
41
|
+
minHeight?: string;
|
|
42
|
+
gravity?: string;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
activityName?: string;
|
|
46
|
+
fontProvider?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ControllerSettingsDirectoryUI extends IControllerSettingsDirectoryUI {
|
|
51
|
+
main: string;
|
|
52
|
+
animation: string;
|
|
53
|
+
theme: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
56
|
export type DependencyScopes = "compile" | "provided" | "runtime" | "test";
|