@pi-r/android 0.8.1 → 0.8.3
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 +6 -6
- package/data/google-maven-snapshot.json +1 -1
- package/data/google-maven.json +1 -1
- package/extensions/gradle/dependencies/index.js +2 -2
- package/index.d.ts +6 -6
- package/package.json +32 -29
- package/project/${app}/${src}/res/drawable/ic_launcher_background.xml +170 -170
- package/project/${app}/${src}/res/drawable/ic_launcher_foreground.xml +29 -29
- package/project/${app}/${src}/res/mipmap-anydpi-v26/ic_launcher.xml +5 -5
- package/project/${app}/${src}/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -5
- package/project/gradle/wrapper/gradle-wrapper.properties +4 -4
- package/project/gradle.properties +3 -3
- package/template/AndroidManifest.xml +24 -24
- package/template/java/build.gradle +38 -38
- package/template/java/static/build.gradle +3 -3
- package/template/java+kotlin/build.gradle +43 -43
- package/template/java+kotlin/static/build.gradle +4 -4
- package/template/kotlin/build.gradle.kts +48 -48
- package/template/kotlin/libs.versions.toml +23 -23
- package/template/kotlin/settings.gradle.kts +23 -23
- package/template/kotlin/static/build.gradle.kts +4 -4
- package/types/index.d.ts +79 -79
- package/types/squared.d.ts +89 -89
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id 'com.android.application'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
android {
|
|
6
|
-
namespace ''
|
|
7
|
-
compileSdk 35
|
|
8
|
-
|
|
9
|
-
defaultConfig {
|
|
10
|
-
applicationId ''
|
|
11
|
-
minSdk
|
|
12
|
-
targetSdk 35
|
|
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.6.1'
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.application'
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
android {
|
|
6
|
+
namespace ''
|
|
7
|
+
compileSdk 35
|
|
8
|
+
|
|
9
|
+
defaultConfig {
|
|
10
|
+
applicationId ''
|
|
11
|
+
minSdk 24
|
|
12
|
+
targetSdk 35
|
|
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.6.1'
|
|
39
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id 'com.android.application' version '8.
|
|
3
|
-
id 'com.android.library' version '8.
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.application' version '8.7.0' apply false
|
|
3
|
+
id 'com.android.library' version '8.7.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 35
|
|
9
|
-
|
|
10
|
-
defaultConfig {
|
|
11
|
-
applicationId ''
|
|
12
|
-
minSdk
|
|
13
|
-
targetSdk 35
|
|
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.13.1'
|
|
41
|
-
testImplementation 'junit:junit:4.13.2'
|
|
42
|
-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
43
|
-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.application'
|
|
3
|
+
id 'org.jetbrains.kotlin.android'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
android {
|
|
7
|
+
namespace ''
|
|
8
|
+
compileSdk 35
|
|
9
|
+
|
|
10
|
+
defaultConfig {
|
|
11
|
+
applicationId ''
|
|
12
|
+
minSdk 24
|
|
13
|
+
targetSdk 35
|
|
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.13.1'
|
|
41
|
+
testImplementation 'junit:junit:4.13.2'
|
|
42
|
+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
43
|
+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
|
44
44
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
id 'com.android.application' version '8.
|
|
3
|
-
id 'com.android.library' version '8.
|
|
4
|
-
id 'org.jetbrains.kotlin.android' version '1.9.25' apply false
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.application' version '8.7.0' apply false
|
|
3
|
+
id 'com.android.library' version '8.7.0' apply false
|
|
4
|
+
id 'org.jetbrains.kotlin.android' version '1.9.25' apply false
|
|
5
5
|
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
alias(libs.plugins.android.application)
|
|
3
|
-
alias(libs.plugins.jetbrains.kotlin.android)
|
|
4
|
-
alias(libs.plugins.jetbrains.kotlin.compose)
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
android {
|
|
8
|
-
namespace = ""
|
|
9
|
-
compileSdk = 35
|
|
10
|
-
|
|
11
|
-
defaultConfig {
|
|
12
|
-
applicationId = ""
|
|
13
|
-
minSdk =
|
|
14
|
-
targetSdk = 35
|
|
15
|
-
versionCode = 1
|
|
16
|
-
versionName = "1.0"
|
|
17
|
-
|
|
18
|
-
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
19
|
-
}
|
|
20
|
-
buildTypes {
|
|
21
|
-
release {
|
|
22
|
-
isDebuggable = false
|
|
23
|
-
isMinifyEnabled = true
|
|
24
|
-
isShrinkResources = false
|
|
25
|
-
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
kotlinOptions {
|
|
29
|
-
jvmTarget = "1.8"
|
|
30
|
-
}
|
|
31
|
-
buildFeatures {
|
|
32
|
-
viewBinding = true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
java {
|
|
37
|
-
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
38
|
-
targetCompatibility = JavaVersion.VERSION_1_8
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
dependencies {
|
|
42
|
-
implementation(libs.jetbrains.kotlin)
|
|
43
|
-
implementation(libs.androidx.core.ktx)
|
|
44
|
-
implementation(libs.androidx.appcompat)
|
|
45
|
-
implementation(libs.androidx.constraintlayout)
|
|
46
|
-
testImplementation(libs.junit)
|
|
47
|
-
androidTestImplementation(libs.androidx.junit)
|
|
48
|
-
androidTestImplementation(libs.androidx.espresso.core)
|
|
1
|
+
plugins {
|
|
2
|
+
alias(libs.plugins.android.application)
|
|
3
|
+
alias(libs.plugins.jetbrains.kotlin.android)
|
|
4
|
+
alias(libs.plugins.jetbrains.kotlin.compose)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
android {
|
|
8
|
+
namespace = ""
|
|
9
|
+
compileSdk = 35
|
|
10
|
+
|
|
11
|
+
defaultConfig {
|
|
12
|
+
applicationId = ""
|
|
13
|
+
minSdk = 24
|
|
14
|
+
targetSdk = 35
|
|
15
|
+
versionCode = 1
|
|
16
|
+
versionName = "1.0"
|
|
17
|
+
|
|
18
|
+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
19
|
+
}
|
|
20
|
+
buildTypes {
|
|
21
|
+
release {
|
|
22
|
+
isDebuggable = false
|
|
23
|
+
isMinifyEnabled = true
|
|
24
|
+
isShrinkResources = false
|
|
25
|
+
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
kotlinOptions {
|
|
29
|
+
jvmTarget = "1.8"
|
|
30
|
+
}
|
|
31
|
+
buildFeatures {
|
|
32
|
+
viewBinding = true
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
java {
|
|
37
|
+
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
38
|
+
targetCompatibility = JavaVersion.VERSION_1_8
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
dependencies {
|
|
42
|
+
implementation(libs.jetbrains.kotlin)
|
|
43
|
+
implementation(libs.androidx.core.ktx)
|
|
44
|
+
implementation(libs.androidx.appcompat)
|
|
45
|
+
implementation(libs.androidx.constraintlayout)
|
|
46
|
+
testImplementation(libs.junit)
|
|
47
|
+
androidTestImplementation(libs.androidx.junit)
|
|
48
|
+
androidTestImplementation(libs.androidx.espresso.core)
|
|
49
49
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
[versions]
|
|
2
|
-
agp = "8.
|
|
3
|
-
kotlin = "2.0.
|
|
4
|
-
coreKtx = "1.13.1"
|
|
5
|
-
junit = "4.13.2"
|
|
6
|
-
junitVersion = "1.2.1"
|
|
7
|
-
espressoCore = "3.6.1"
|
|
8
|
-
appcompat = "1.7.0"
|
|
9
|
-
constraintlayout = "2.1.4"
|
|
10
|
-
|
|
11
|
-
[libraries]
|
|
12
|
-
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
|
13
|
-
jetbrains-kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
|
|
14
|
-
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
|
15
|
-
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
|
16
|
-
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
|
17
|
-
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
|
18
|
-
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
|
19
|
-
|
|
20
|
-
[plugins]
|
|
21
|
-
android-application = { id = "com.android.application", version.ref = "agp" }
|
|
22
|
-
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
|
23
|
-
jetbrains-kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
|
1
|
+
[versions]
|
|
2
|
+
agp = "8.7.0"
|
|
3
|
+
kotlin = "2.0.21"
|
|
4
|
+
coreKtx = "1.13.1"
|
|
5
|
+
junit = "4.13.2"
|
|
6
|
+
junitVersion = "1.2.1"
|
|
7
|
+
espressoCore = "3.6.1"
|
|
8
|
+
appcompat = "1.7.0"
|
|
9
|
+
constraintlayout = "2.1.4"
|
|
10
|
+
|
|
11
|
+
[libraries]
|
|
12
|
+
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
|
13
|
+
jetbrains-kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
|
|
14
|
+
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
|
15
|
+
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
|
16
|
+
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
|
17
|
+
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
|
18
|
+
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
|
19
|
+
|
|
20
|
+
[plugins]
|
|
21
|
+
android-application = { id = "com.android.application", version.ref = "agp" }
|
|
22
|
+
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
|
23
|
+
jetbrains-kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
val snapshotVersion : String? = System.getenv("ANDROIDX_SNAPSHOT_ID")
|
|
2
|
-
|
|
3
|
-
pluginManagement {
|
|
4
|
-
repositories {
|
|
5
|
-
google()
|
|
6
|
-
mavenCentral()
|
|
7
|
-
gradlePluginPortal()
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
dependencyResolutionManagement {
|
|
12
|
-
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
13
|
-
repositories {
|
|
14
|
-
snapshotVersion?.let {
|
|
15
|
-
println("https://androidx.dev/snapshots/builds/$it/artifacts/repository/")
|
|
16
|
-
maven { url = uri("https://androidx.dev/snapshots/builds/$it/artifacts/repository/") }
|
|
17
|
-
}
|
|
18
|
-
google()
|
|
19
|
-
mavenCentral()
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
rootProject.name = "{{projectName}}"
|
|
1
|
+
val snapshotVersion : String? = System.getenv("ANDROIDX_SNAPSHOT_ID")
|
|
2
|
+
|
|
3
|
+
pluginManagement {
|
|
4
|
+
repositories {
|
|
5
|
+
google()
|
|
6
|
+
mavenCentral()
|
|
7
|
+
gradlePluginPortal()
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
dependencyResolutionManagement {
|
|
12
|
+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
13
|
+
repositories {
|
|
14
|
+
snapshotVersion?.let {
|
|
15
|
+
println("https://androidx.dev/snapshots/builds/$it/artifacts/repository/")
|
|
16
|
+
maven { url = uri("https://androidx.dev/snapshots/builds/$it/artifacts/repository/") }
|
|
17
|
+
}
|
|
18
|
+
google()
|
|
19
|
+
mavenCentral()
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
rootProject.name = "{{projectName}}"
|
|
24
24
|
include("{{name}}")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
plugins {
|
|
2
|
-
alias(libs.plugins.android.application) apply false
|
|
3
|
-
alias(libs.plugins.jetbrains.kotlin.android) apply false
|
|
4
|
-
alias(libs.plugins.jetbrains.kotlin.compose) apply false
|
|
1
|
+
plugins {
|
|
2
|
+
alias(libs.plugins.android.application) apply false
|
|
3
|
+
alias(libs.plugins.jetbrains.kotlin.android) apply false
|
|
4
|
+
alias(libs.plugins.jetbrains.kotlin.compose) apply false
|
|
5
5
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import type { DocumentConstructor, IDocument, IFileManager } from '@e-mc/types/lib';
|
|
2
|
-
import type { ExternalAsset } from '@e-mc/types/lib/asset';
|
|
3
|
-
import type { ExecAction, DocumentDirectory as IDocumentDirectory, DocumentModule as IDocumentModule, DocumentSettings as IDocumentSettings } from '@e-mc/types/lib/settings';
|
|
4
|
-
|
|
5
|
-
import type { DependencyScopes, DocumentOutput, FinalizedElement } from './squared';
|
|
6
|
-
|
|
7
|
-
interface DocumentDirectory extends IDocumentDirectory {
|
|
8
|
-
template?: string;
|
|
9
|
-
project?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface AndroidDocumentSettings extends Pick<IDocumentSettings, "users" | "directory">, PlainObject {
|
|
13
|
-
extensions?: {
|
|
14
|
-
task?: {
|
|
15
|
-
exec?: ExecAction;
|
|
16
|
-
command?: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
language?: {
|
|
20
|
-
[T in LanguageOfType]?: LanguageType;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
type DocumentProperties = "targetAPI" | "elements" | "extensionData" | "directories";
|
|
25
|
-
|
|
26
|
-
export interface UserConfig extends Omit<DocumentOutput, DocumentProperties> {
|
|
27
|
-
mainParentDir: string;
|
|
28
|
-
mainSrcDir: string;
|
|
29
|
-
mainActivityFile: string;
|
|
30
|
-
javaVersion: number;
|
|
31
|
-
dataBinding: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface DocumentModule extends IDocumentModule {
|
|
35
|
-
settings?: AndroidDocumentSettings;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface TemplateData {
|
|
39
|
-
localUri?: string;
|
|
40
|
-
source?: string;
|
|
41
|
-
existing?: boolean;
|
|
42
|
-
kotlin?: boolean;
|
|
43
|
-
language?: LanguageType;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface FindTemplateOptions {
|
|
47
|
-
detect?: boolean;
|
|
48
|
-
languageOf?: LanguageOfType;
|
|
49
|
-
subDir?: ArrayOf<string>;
|
|
50
|
-
throwsDoesNotExist?: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface MavenArtifact {
|
|
54
|
-
groupId: string;
|
|
55
|
-
artifactId: string;
|
|
56
|
-
version: string;
|
|
57
|
-
scope?: DependencyScopes;
|
|
58
|
-
dependencies?: MavenArtifact[];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export type LanguageType = "java" | "kotlin" | "java+kotlin";
|
|
62
|
-
export type LanguageOfType = "gradle";
|
|
63
|
-
export type DocumentAsset = ExternalAsset;
|
|
64
|
-
|
|
65
|
-
export interface IAndroidDocument<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends IDocument<T, U, DocumentModule>, Pick<DocumentOutput, DocumentProperties> {
|
|
66
|
-
config: UserConfig;
|
|
67
|
-
elements: FinalizedElement[];
|
|
68
|
-
extensionData: PlainObject;
|
|
69
|
-
findTemplate(baseDir: string, filename: string, options?: FindTemplateOptions): TemplateData;
|
|
70
|
-
findData<V = AnyObject>(filename: string, format?: string): Null<V>;
|
|
71
|
-
languageOf(name: LanguageOfType, value?: LanguageType): Undef<LanguageType>;
|
|
72
|
-
detectKts(...paths: string[]): Null<boolean>;
|
|
73
|
-
detect(host?: T): boolean;
|
|
74
|
-
get settings(): AndroidDocumentSettings;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface AndroidDocumentConstructor<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends ConstructorDerived<DocumentConstructor<T, U>> {
|
|
78
|
-
readonly prototype: IAndroidDocument<T, U>;
|
|
79
|
-
new(module?: DocumentModule, ...args: unknown[]): IAndroidDocument<T, U>;
|
|
1
|
+
import type { DocumentConstructor, IDocument, IFileManager } from '@e-mc/types/lib';
|
|
2
|
+
import type { ExternalAsset } from '@e-mc/types/lib/asset';
|
|
3
|
+
import type { ExecAction, DocumentDirectory as IDocumentDirectory, DocumentModule as IDocumentModule, DocumentSettings as IDocumentSettings } from '@e-mc/types/lib/settings';
|
|
4
|
+
|
|
5
|
+
import type { DependencyScopes, DocumentOutput, FinalizedElement } from './squared';
|
|
6
|
+
|
|
7
|
+
interface DocumentDirectory extends IDocumentDirectory {
|
|
8
|
+
template?: string;
|
|
9
|
+
project?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface AndroidDocumentSettings extends Pick<IDocumentSettings, "users" | "directory">, PlainObject {
|
|
13
|
+
extensions?: {
|
|
14
|
+
task?: {
|
|
15
|
+
exec?: ExecAction;
|
|
16
|
+
command?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
language?: {
|
|
20
|
+
[T in LanguageOfType]?: LanguageType;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type DocumentProperties = "targetAPI" | "elements" | "extensionData" | "directories";
|
|
25
|
+
|
|
26
|
+
export interface UserConfig extends Omit<DocumentOutput, DocumentProperties> {
|
|
27
|
+
mainParentDir: string;
|
|
28
|
+
mainSrcDir: string;
|
|
29
|
+
mainActivityFile: string;
|
|
30
|
+
javaVersion: number;
|
|
31
|
+
dataBinding: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DocumentModule extends IDocumentModule {
|
|
35
|
+
settings?: AndroidDocumentSettings;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface TemplateData {
|
|
39
|
+
localUri?: string;
|
|
40
|
+
source?: string;
|
|
41
|
+
existing?: boolean;
|
|
42
|
+
kotlin?: boolean;
|
|
43
|
+
language?: LanguageType;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface FindTemplateOptions {
|
|
47
|
+
detect?: boolean;
|
|
48
|
+
languageOf?: LanguageOfType;
|
|
49
|
+
subDir?: ArrayOf<string>;
|
|
50
|
+
throwsDoesNotExist?: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface MavenArtifact {
|
|
54
|
+
groupId: string;
|
|
55
|
+
artifactId: string;
|
|
56
|
+
version: string;
|
|
57
|
+
scope?: DependencyScopes;
|
|
58
|
+
dependencies?: MavenArtifact[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type LanguageType = "java" | "kotlin" | "java+kotlin";
|
|
62
|
+
export type LanguageOfType = "gradle";
|
|
63
|
+
export type DocumentAsset = ExternalAsset;
|
|
64
|
+
|
|
65
|
+
export interface IAndroidDocument<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends IDocument<T, U, DocumentModule>, Pick<DocumentOutput, DocumentProperties> {
|
|
66
|
+
config: UserConfig;
|
|
67
|
+
elements: FinalizedElement[];
|
|
68
|
+
extensionData: PlainObject;
|
|
69
|
+
findTemplate(baseDir: string, filename: string, options?: FindTemplateOptions): TemplateData;
|
|
70
|
+
findData<V = AnyObject>(filename: string, format?: string): Null<V>;
|
|
71
|
+
languageOf(name: LanguageOfType, value?: LanguageType): Undef<LanguageType>;
|
|
72
|
+
detectKts(...paths: string[]): Null<boolean>;
|
|
73
|
+
detect(host?: T): boolean;
|
|
74
|
+
get settings(): AndroidDocumentSettings;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface AndroidDocumentConstructor<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends ConstructorDerived<DocumentConstructor<T, U>> {
|
|
78
|
+
readonly prototype: IAndroidDocument<T, U>;
|
|
79
|
+
new(module?: DocumentModule, ...args: unknown[]): IAndroidDocument<T, U>;
|
|
80
80
|
}
|