@open-mova/cli 0.1.18 → 0.1.19

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 CHANGED
@@ -165,6 +165,10 @@ mova cap sync android
165
165
  mova cap sync
166
166
  ```
167
167
 
168
+ En Android, el CLI aplica también los requisitos técnicos de los plugins
169
+ incluidos por la shell: configura el repositorio AAR de Background Runner y
170
+ eleva `minSdkVersion` a 28 cuando está instalado Local LLM.
171
+
168
172
  ### `mova cap open`
169
173
 
170
174
  Abre el proyecto nativo en Android Studio o Xcode.
@@ -79,9 +79,28 @@ function configureExistingPlatforms(root) {
79
79
  }
80
80
  function configureNativePlatform(root, platform) {
81
81
  if (platform === 'android') {
82
+ configureMinimumAndroidSdk(root);
82
83
  configureBackgroundRunnerForAndroid(root);
83
84
  }
84
85
  }
86
+ function configureMinimumAndroidSdk(root) {
87
+ const packageJson = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
88
+ if (!packageJson.dependencies?.['@capacitor/local-llm'])
89
+ return;
90
+ const variablesPath = join(root, 'android', 'variables.gradle');
91
+ if (!existsSync(variablesPath)) {
92
+ throw new Error('No se encuentra android/variables.gradle para configurar Local LLM.');
93
+ }
94
+ const variables = readFileSync(variablesPath, 'utf8');
95
+ const minimumSdkPattern = /minSdkVersion\s*=\s*(\d+)/;
96
+ const currentMinimumSdk = Number(minimumSdkPattern.exec(variables)?.[1]);
97
+ if (!Number.isFinite(currentMinimumSdk)) {
98
+ throw new Error('No se ha encontrado minSdkVersion en android/variables.gradle.');
99
+ }
100
+ if (currentMinimumSdk >= 28)
101
+ return;
102
+ writeFileSync(variablesPath, variables.replace(minimumSdkPattern, 'minSdkVersion = 28'), 'utf8');
103
+ }
85
104
  function configureBackgroundRunnerForAndroid(root) {
86
105
  const packageJson = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
87
106
  if (!packageJson.dependencies?.['@capacitor/background-runner'])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mova/cli",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "CLI para crear y mantener aplicaciones Open Mova",
5
5
  "license": "MIT",
6
6
  "author": "Open Mova contributors",