@nativue/core 0.13.0 → 0.14.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/AGENTS.md +31 -7
- package/README.md +1 -0
- package/android/build.gradle.kts +4 -0
- package/android/nativue.settings.gradle.kts +2 -0
- package/android/src/main/java/dev/nativue/Bridge.kt +66 -7
- package/android/src/main/java/dev/nativue/NativueActivity.kt +12 -5
- package/android/src/main/java/dev/nativue/Permissions.kt +107 -0
- package/android/src/main/java/dev/nativue/Plugins.kt +98 -15
- package/cli/android-project.mjs +377 -0
- package/cli/app-config.mjs +515 -0
- package/cli/config.d.mts +162 -3
- package/cli/ios-project.mjs +652 -0
- package/cli/link.mjs +66 -71
- package/cli/nativue.mjs +39 -5
- package/cli/plugins.mjs +236 -0
- package/cli/prebuild.mjs +458 -0
- package/cli/run.mjs +2 -2
- package/cli/serialize.mjs +168 -0
- package/ios/AppLifecycle.swift +165 -0
- package/ios/Bridge.swift +53 -4
- package/ios/NativueView.swift +5 -1
- package/ios/Permissions.swift +19 -0
- package/ios/Plugins.swift +24 -0
- package/package.json +3 -2
- package/src/globals.ts +7 -1
- package/src/native-events.ts +99 -0
- package/src/native-functions.ts +16 -2
- package/src/permissions.ts +57 -0
- package/src/renderer.ts +5 -1
- package/src/router.ts +2 -1
- package/src/types.ts +3 -0
- package/template/android/app/src/debug/AndroidManifest.xml +4 -0
- package/template/android/app/src/main/java/MainActivity.kt +5 -0
- package/template/android/app/src/main/res/drawable-night-xxxhdpi/splash_logo.png +0 -0
- package/template/android/app/src/main/res/drawable-xxxhdpi/splash_logo.png +0 -0
- package/template/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +6 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/template/android/app/src/main/res/values/colors.xml +4 -0
- package/template/android/app/src/main/res/values/styles.xml +15 -0
- package/template/android/app/src/main/res/values-night/styles.xml +5 -0
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +9 -0
- package/template/android/gradlew +248 -0
- package/template/android/gradlew.bat +112 -0
- package/template/ios/App/App.swift +18 -0
- package/template/ios/App/Assets.xcassets/AppIcon.appiconset/Contents.json +1 -0
- package/template/ios/App/Assets.xcassets/AppIcon.appiconset/icon.png +0 -0
- package/template/ios/App/Assets.xcassets/Contents.json +1 -0
- package/template/ios/App/Assets.xcassets/LaunchLogo.imageset/Contents.json +11 -0
- package/template/ios/App/Assets.xcassets/LaunchLogo.imageset/logo-dark@1x.png +0 -0
- package/template/ios/App/Assets.xcassets/LaunchLogo.imageset/logo-dark@2x.png +0 -0
- package/template/ios/App/Assets.xcassets/LaunchLogo.imageset/logo-dark@3x.png +0 -0
- package/template/ios/App/Assets.xcassets/LaunchLogo.imageset/logo@1x.png +0 -0
- package/template/ios/App/Assets.xcassets/LaunchLogo.imageset/logo@2x.png +0 -0
- package/template/ios/App/Assets.xcassets/LaunchLogo.imageset/logo@3x.png +0 -0
- package/template/ios/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +15 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
// The Android project files prebuild builds from the config, instead of copying them from the
|
|
2
|
+
// template: the app's manifest, Gradle files and strings, its resources, and the icon and splash
|
|
3
|
+
// images. A null file removes the template's.
|
|
4
|
+
import { readFileSync } from 'node:fs'
|
|
5
|
+
import { join, relative, resolve } from 'node:path'
|
|
6
|
+
import { toPosixPath } from './link.mjs'
|
|
7
|
+
import { appResources, emptyGradle, gradleProblems, resourceFile } from './app-config.mjs'
|
|
8
|
+
import { applyMods } from './plugins.mjs'
|
|
9
|
+
import { androidString, xml } from './serialize.mjs'
|
|
10
|
+
|
|
11
|
+
// Changes the activity handles itself, so they don't recreate it and restart JS.
|
|
12
|
+
const CONFIG_CHANGES = [
|
|
13
|
+
'orientation',
|
|
14
|
+
'screenSize',
|
|
15
|
+
'smallestScreenSize',
|
|
16
|
+
'screenLayout',
|
|
17
|
+
'keyboard',
|
|
18
|
+
'keyboardHidden',
|
|
19
|
+
'uiMode',
|
|
20
|
+
'fontScale',
|
|
21
|
+
'locale',
|
|
22
|
+
'layoutDirection',
|
|
23
|
+
]
|
|
24
|
+
const ANDROID_PLUGIN_VERSION = '9.5.1'
|
|
25
|
+
const ANDROID_NAMESPACE = 'http://schemas.android.com/apk/res/android'
|
|
26
|
+
const TOOLS_NAMESPACE = 'http://schemas.android.com/tools'
|
|
27
|
+
// The splash icon without a background is 288dp; the logo, 120dp as on iOS, is inset in it. A
|
|
28
|
+
// fraction, since Android scales the icon to its own size.
|
|
29
|
+
const SPLASH_LOGO_INSET = `${(((288 - 120) / 2 / 288) * 100).toFixed(2)}%`
|
|
30
|
+
|
|
31
|
+
/** Inside a Kotlin "string": no escapes or $templates. */
|
|
32
|
+
function kotlinString(text) {
|
|
33
|
+
return `"${text.replaceAll('\\', '\\\\').replaceAll('"', '\\"').replaceAll('$', '\\$')}"`
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function element(tag, attributes = {}, children = []) {
|
|
37
|
+
return { tag, attributes, children }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function intentFilter(action, categories, children = []) {
|
|
41
|
+
return element('intent-filter', {}, [
|
|
42
|
+
element('action', { 'android:name': action }),
|
|
43
|
+
...categories.map((category) => element('category', { 'android:name': category })),
|
|
44
|
+
...children,
|
|
45
|
+
])
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** The base manifest, every element a plugin's manifest mod may change. */
|
|
49
|
+
export function nativueManifest(app) {
|
|
50
|
+
const mainActivity = element(
|
|
51
|
+
'activity',
|
|
52
|
+
{
|
|
53
|
+
'android:name': '.MainActivity',
|
|
54
|
+
'android:configChanges': CONFIG_CHANGES.join('|'),
|
|
55
|
+
'android:exported': 'true',
|
|
56
|
+
'android:launchMode': 'singleTask',
|
|
57
|
+
'android:windowSoftInputMode': 'adjustResize',
|
|
58
|
+
},
|
|
59
|
+
[
|
|
60
|
+
intentFilter('android.intent.action.MAIN', ['android.intent.category.LAUNCHER']),
|
|
61
|
+
intentFilter(
|
|
62
|
+
'android.intent.action.VIEW',
|
|
63
|
+
['android.intent.category.DEFAULT', 'android.intent.category.BROWSABLE'],
|
|
64
|
+
app.schemes.map((scheme) => element('data', { 'android:scheme': scheme })),
|
|
65
|
+
),
|
|
66
|
+
],
|
|
67
|
+
)
|
|
68
|
+
const application = element(
|
|
69
|
+
'application',
|
|
70
|
+
{
|
|
71
|
+
'android:icon': '@mipmap/ic_launcher',
|
|
72
|
+
'android:label': '@string/app_name',
|
|
73
|
+
'android:theme': '@style/AppTheme',
|
|
74
|
+
},
|
|
75
|
+
[mainActivity],
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
return element(
|
|
79
|
+
'manifest',
|
|
80
|
+
{ 'xmlns:android': ANDROID_NAMESPACE, 'xmlns:tools': TOOLS_NAMESPACE },
|
|
81
|
+
[application],
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function isPermission(child, names) {
|
|
86
|
+
return child.tag === 'uses-permission' && names.includes(child.attributes['android:name'])
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* nativue's manifest, then the plugins' mods, then the app's permissions. A blocked permission is
|
|
91
|
+
* removed here and, with tools:node="remove", from the packages' manifests Gradle merges in.
|
|
92
|
+
*/
|
|
93
|
+
function manifest(app, plugins, context) {
|
|
94
|
+
const document = applyMods(plugins, 'android', 'manifest', nativueManifest(app), context)
|
|
95
|
+
const blocked = app.android.blockedPermissions ?? []
|
|
96
|
+
const requested = (app.android.permissions ?? []).filter((name) => !blocked.includes(name))
|
|
97
|
+
const permissions = [
|
|
98
|
+
...requested.map((name) => element('uses-permission', { 'android:name': name })),
|
|
99
|
+
...blocked.map((name) =>
|
|
100
|
+
element('uses-permission', { 'android:name': name, 'tools:node': 'remove' }),
|
|
101
|
+
),
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
return {
|
|
105
|
+
...document,
|
|
106
|
+
children: [
|
|
107
|
+
...permissions,
|
|
108
|
+
// The app's entry replaces a plugin's of the same name, whatever attributes it had.
|
|
109
|
+
...document.children.filter((child) => !isPermission(child, [...requested, ...blocked])),
|
|
110
|
+
],
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** The plugins' strings, then the app's name. */
|
|
115
|
+
function strings(app, plugins, context) {
|
|
116
|
+
const values = { ...applyMods(plugins, 'android', 'strings', {}, context), app_name: app.name }
|
|
117
|
+
|
|
118
|
+
return element(
|
|
119
|
+
'resources',
|
|
120
|
+
{},
|
|
121
|
+
Object.entries(values).map(([name, text]) => ({
|
|
122
|
+
tag: 'string',
|
|
123
|
+
attributes: { name },
|
|
124
|
+
text: androidString(String(text)),
|
|
125
|
+
})),
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Release signing from a keystore outside android/, its passwords never written to a file. */
|
|
130
|
+
function signingGradle(signing, appDirectory) {
|
|
131
|
+
if (!signing) return { top: '', android: '' }
|
|
132
|
+
|
|
133
|
+
const storeFile = toPosixPath(
|
|
134
|
+
relative(join(appDirectory, 'android', 'app'), resolve(appDirectory, signing.storeFile)),
|
|
135
|
+
)
|
|
136
|
+
const secrets = [signing.storePasswordEnv, signing.keyPasswordEnv]
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
top: `
|
|
140
|
+
// Release signing's passwords: a Gradle property (~/.gradle/gradle.properties, which Android Studio
|
|
141
|
+
// reads too) or an environment variable (CI). Debug builds don't need them.
|
|
142
|
+
fun secret(name: String): String? =
|
|
143
|
+
providers.gradleProperty(name).orElse(providers.environmentVariable(name)).orNull
|
|
144
|
+
|
|
145
|
+
val missingSigningSecrets = listOf(${secrets.map((name) => `"${name}"`).join(', ')}).filter { secret(it) == null }
|
|
146
|
+
|
|
147
|
+
// Stops before building, with the names; any other release build fails at signing.
|
|
148
|
+
if (missingSigningSecrets.isNotEmpty() && gradle.startParameter.taskNames.any { it.contains("Release") }) {
|
|
149
|
+
throw GradleException(
|
|
150
|
+
${kotlinString(`A release build is signed with ${signing.storeFile}, and needs `)} +
|
|
151
|
+
missingSigningSecrets.joinToString() +
|
|
152
|
+
": set them as environment variables, or in ~/.gradle/gradle.properties.",
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
`,
|
|
156
|
+
android: `
|
|
157
|
+
signingConfigs {
|
|
158
|
+
create("release") {
|
|
159
|
+
storeFile = file(${kotlinString(storeFile)})
|
|
160
|
+
storePassword = secret("${signing.storePasswordEnv}")
|
|
161
|
+
keyAlias = ${kotlinString(signing.keyAlias)}
|
|
162
|
+
keyPassword = secret("${signing.keyPasswordEnv}")
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
buildTypes {
|
|
167
|
+
getByName("release") {
|
|
168
|
+
signingConfig = signingConfigs.getByName("release")
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
`,
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function unique(values) {
|
|
176
|
+
return [...new Set(values)]
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** The plugins' gradle mods, then the app's android.gradle: its values win, lists are joined. */
|
|
180
|
+
function gradleModel(app, plugins, context) {
|
|
181
|
+
const fromPlugins = applyMods(plugins, 'android', 'gradle', emptyGradle(), context)
|
|
182
|
+
const problems = gradleProblems(fromPlugins, "the plugins' gradle mods' result").filter(Boolean)
|
|
183
|
+
|
|
184
|
+
if (problems.length > 0) throw new Error(problems.join('\n'))
|
|
185
|
+
|
|
186
|
+
const ownGradle = app.android.gradle ?? {}
|
|
187
|
+
const own = Object.fromEntries(
|
|
188
|
+
Object.entries(emptyGradle()).map(([key, empty]) => [key, ownGradle[key] ?? empty]),
|
|
189
|
+
)
|
|
190
|
+
const gradlePlugins = [...fromPlugins.plugins, ...own.plugins]
|
|
191
|
+
|
|
192
|
+
return {
|
|
193
|
+
plugins: [...new Map(gradlePlugins.map((plugin) => [plugin.id, plugin])).values()],
|
|
194
|
+
dependencies: unique([...fromPlugins.dependencies, ...own.dependencies]),
|
|
195
|
+
manifestPlaceholders: { ...fromPlugins.manifestPlaceholders, ...own.manifestPlaceholders },
|
|
196
|
+
repositories: unique([...fromPlugins.repositories, ...own.repositories]),
|
|
197
|
+
properties: { ...fromPlugins.properties, ...own.properties },
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function lines(values, indent) {
|
|
202
|
+
return values.map((value) => `${indent}${value}\n`).join('')
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function appGradle(app, appDirectory, gradle) {
|
|
206
|
+
const signing = signingGradle(app.android.signing, appDirectory)
|
|
207
|
+
const pluginIds = gradle.plugins.map(({ id }) => `id(${kotlinString(id)})`)
|
|
208
|
+
const placeholders = Object.entries(gradle.manifestPlaceholders).map(
|
|
209
|
+
([key, value]) => `manifestPlaceholders[${kotlinString(key)}] = ${kotlinString(value)}`,
|
|
210
|
+
)
|
|
211
|
+
const dependencies = gradle.dependencies.map(
|
|
212
|
+
(dependency) => `implementation(${kotlinString(dependency)})`,
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
return `plugins {
|
|
216
|
+
id("com.android.application")
|
|
217
|
+
${lines(pluginIds, ' ')}}
|
|
218
|
+
${signing.top}
|
|
219
|
+
android {
|
|
220
|
+
namespace = "${app.android.package}"
|
|
221
|
+
compileSdk = 37
|
|
222
|
+
|
|
223
|
+
defaultConfig {
|
|
224
|
+
applicationId = "${app.android.package}"
|
|
225
|
+
minSdk = 24
|
|
226
|
+
targetSdk = 36
|
|
227
|
+
versionCode = ${app.buildNumber}
|
|
228
|
+
versionName = "${app.version}"
|
|
229
|
+
${lines(placeholders, ' ')} }
|
|
230
|
+
${signing.android}
|
|
231
|
+
compileOptions {
|
|
232
|
+
sourceCompatibility = JavaVersion.VERSION_17
|
|
233
|
+
targetCompatibility = JavaVersion.VERSION_17
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
dependencies {
|
|
238
|
+
implementation(project(":nativue"))
|
|
239
|
+
${lines(dependencies, ' ')}}
|
|
240
|
+
`
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/** The root build file: the version of every Gradle plugin the app applies. */
|
|
244
|
+
function rootGradle(gradle) {
|
|
245
|
+
const versioned = gradle.plugins
|
|
246
|
+
.filter(({ version }) => version)
|
|
247
|
+
.map(
|
|
248
|
+
({ id, version }) => `id(${kotlinString(id)}) version ${kotlinString(version)} apply false`,
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
return `plugins {
|
|
252
|
+
id("com.android.application") version "${ANDROID_PLUGIN_VERSION}" apply false
|
|
253
|
+
id("com.android.library") version "${ANDROID_PLUGIN_VERSION}" apply false
|
|
254
|
+
${lines(versioned, ' ')}}
|
|
255
|
+
`
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function settingsGradle(gradle, corePath) {
|
|
259
|
+
const repositories = lines(
|
|
260
|
+
gradle.repositories.map((url) => `maven(${kotlinString(url)})`),
|
|
261
|
+
' ',
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
return `pluginManagement {
|
|
265
|
+
repositories {
|
|
266
|
+
google()
|
|
267
|
+
mavenCentral()
|
|
268
|
+
gradlePluginPortal()
|
|
269
|
+
${repositories} }
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
dependencyResolutionManagement {
|
|
273
|
+
repositories {
|
|
274
|
+
google()
|
|
275
|
+
mavenCentral()
|
|
276
|
+
${repositories} }
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
rootProject.name = "App"
|
|
280
|
+
include(":app")
|
|
281
|
+
include(":nativue")
|
|
282
|
+
project(":nativue").projectDir = file("${corePath}/android")
|
|
283
|
+
// The Android side of the app's packages (see the file)
|
|
284
|
+
apply(from = "${corePath}/android/nativue.settings.gradle.kts")
|
|
285
|
+
`
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function gradleProperties(gradle) {
|
|
289
|
+
const properties = Object.entries(gradle.properties).map(([key, value]) => `${key}=${value}`)
|
|
290
|
+
|
|
291
|
+
return `org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8\n${lines(properties, '')}`
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** res/<type>/<name>.<extension>, or assets/<name>. */
|
|
295
|
+
function resourceFiles(resources, readAppFile) {
|
|
296
|
+
return Object.fromEntries(
|
|
297
|
+
resources
|
|
298
|
+
.filter((resource) => resource.android)
|
|
299
|
+
.map((resource) => [
|
|
300
|
+
`app/src/main/${resourceFile(resource)}`,
|
|
301
|
+
{ content: readAppFile(resource.source) },
|
|
302
|
+
]),
|
|
303
|
+
)
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** The template's logo, or the app's centered at 120dp in the splash icon. */
|
|
307
|
+
function splashFiles(splash, readAppFile) {
|
|
308
|
+
if (!splash.image) return {}
|
|
309
|
+
|
|
310
|
+
const icon = element('inset', {
|
|
311
|
+
'xmlns:android': ANDROID_NAMESPACE,
|
|
312
|
+
'android:drawable': '@drawable/splash_image',
|
|
313
|
+
'android:inset': SPLASH_LOGO_INSET,
|
|
314
|
+
})
|
|
315
|
+
|
|
316
|
+
return {
|
|
317
|
+
'app/src/main/res/drawable-xxxhdpi/splash_logo.png': null,
|
|
318
|
+
'app/src/main/res/drawable-night-xxxhdpi/splash_logo.png': null,
|
|
319
|
+
'app/src/main/res/drawable/splash_logo.xml': xml(icon),
|
|
320
|
+
// 360px at 3x is the logo's 120dp.
|
|
321
|
+
'app/src/main/res/drawable-xxhdpi/splash_image.png': { content: readAppFile(splash.image) },
|
|
322
|
+
'app/src/main/res/drawable-night-xxhdpi/splash_image.png': {
|
|
323
|
+
content: readAppFile(splash.darkImage),
|
|
324
|
+
},
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/** The legacy icon, and the adaptive one Android 8+ shows; without it, the legacy icon everywhere. */
|
|
329
|
+
function iconFiles(app, readAppFile) {
|
|
330
|
+
const adaptiveIcon = app.android.adaptiveIcon
|
|
331
|
+
const legacy = app.icon
|
|
332
|
+
? { 'app/src/main/res/mipmap-xxxhdpi/ic_launcher.png': { content: readAppFile(app.icon) } }
|
|
333
|
+
: {}
|
|
334
|
+
|
|
335
|
+
if (adaptiveIcon) {
|
|
336
|
+
// No <monochrome>: Android 13's themed icon would tint the whole colored foreground.
|
|
337
|
+
const icon = element('adaptive-icon', { 'xmlns:android': ANDROID_NAMESPACE }, [
|
|
338
|
+
element('background', { 'android:drawable': '@color/ic_launcher_background' }),
|
|
339
|
+
element('foreground', { 'android:drawable': '@mipmap/ic_launcher_foreground' }),
|
|
340
|
+
])
|
|
341
|
+
|
|
342
|
+
return {
|
|
343
|
+
...legacy,
|
|
344
|
+
'app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml': xml(icon),
|
|
345
|
+
'app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png': {
|
|
346
|
+
content: readAppFile(adaptiveIcon.foregroundImage),
|
|
347
|
+
},
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (!app.icon) return {}
|
|
352
|
+
|
|
353
|
+
return {
|
|
354
|
+
...legacy,
|
|
355
|
+
'app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml': null,
|
|
356
|
+
'app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png': null,
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/** Paths relative to android/. */
|
|
361
|
+
export function androidProjectFiles(app, { appDirectory, corePath, plugins = [] }) {
|
|
362
|
+
const readAppFile = (path) => readFileSync(resolve(appDirectory, path))
|
|
363
|
+
const context = { config: app, projectRoot: appDirectory }
|
|
364
|
+
const gradle = gradleModel(app, plugins, context)
|
|
365
|
+
|
|
366
|
+
return {
|
|
367
|
+
'build.gradle.kts': rootGradle(gradle),
|
|
368
|
+
'settings.gradle.kts': settingsGradle(gradle, corePath),
|
|
369
|
+
'gradle.properties': gradleProperties(gradle),
|
|
370
|
+
'app/build.gradle.kts': appGradle(app, appDirectory, gradle),
|
|
371
|
+
'app/src/main/AndroidManifest.xml': xml(manifest(app, plugins, context)),
|
|
372
|
+
'app/src/main/res/values/strings.xml': xml(strings(app, plugins, context)),
|
|
373
|
+
...iconFiles(app, readAppFile),
|
|
374
|
+
...splashFiles(app.splash, readAppFile),
|
|
375
|
+
...resourceFiles(appResources(app, plugins), readAppFile),
|
|
376
|
+
}
|
|
377
|
+
}
|