@tokamakdev/platform-android-arm64 0.1.1-beta.98 → 0.1.1-beta.99

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.
@@ -178,6 +178,7 @@ maven_coordinate='^[A-Za-z0-9._-]+:[A-Za-z0-9._-]+:[A-Za-z0-9._-]+$'
178
178
  registry=$kotlin/TokamakPluginRegistry.kt
179
179
  printf '%s\n\n%s\n%s\n' 'package com.tokamak.runtime' 'internal fun tokamakPlugins(app: TokamakApplication): List<TokamakPlugin> =' ' listOf(' > "$registry"
180
180
  shopt -s nullglob
181
+ raw_names=" "
181
182
  for plugin in "$input/plugins"/*/; do
182
183
  plugin_id=$(basename "$plugin")
183
184
  class=$(cat "$plugin/class" 2>/dev/null || true)
@@ -202,6 +203,19 @@ for plugin in "$input/plugins"/*/; do
202
203
  if [[ -f "$plugin/manifest" ]]; then
203
204
  cp "$plugin/manifest" "$module/src/main/AndroidManifest.xml"
204
205
  fi
206
+ for resource in "$plugin/raw"/*; do
207
+ [[ -f "$resource" ]] || continue
208
+ name=${resource##*/}
209
+ name=${name#*-}
210
+ # Android names a raw resource without its extension, across every plugin.
211
+ if [[ "$raw_names" == *" ${name%%.*} "* ]]; then
212
+ echo "plugin '$plugin_id' raw resource '$name' has the name of another plugin resource" >&2
213
+ exit 1
214
+ fi
215
+ raw_names+=" ${name%%.*} "
216
+ mkdir -p "$module/src/main/res/raw"
217
+ cp "$resource" "$module/src/main/res/raw/$name"
218
+ done
205
219
  {
206
220
  printf '%s\n' 'plugins {' " id 'com.android.library'" " id 'org.jetbrains.kotlin.android'"
207
221
  printf '%s\n\n' '}'
@@ -27,6 +27,7 @@
27
27
  "class": "string",
28
28
  "dependencies": "strings",
29
29
  "manifest": "path",
30
+ "raw": "paths",
30
31
  "sources": "paths"
31
32
  }
32
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokamakdev/platform-android-arm64",
3
- "version": "0.1.1-beta.98",
3
+ "version": "0.1.1-beta.99",
4
4
  "description": "The tokamak platform pack for android-arm64",
5
5
  "repository": {
6
6
  "type": "git",