create-droid 1.1.0 → 1.1.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 +1 -0
- package/dist/template/generateProject.js +5 -1
- package/package.json +1 -1
- package/templates/{ui-compose → compose}/app/build.gradle.kts +5 -0
- package/templates/compose-library/library/build.gradle.kts +5 -0
- package/templates/mobile-compose-navigation/app/build.gradle.kts +5 -0
- package/templates/tv-compose/app/build.gradle.kts +5 -0
- package/templates/{ui-views → views}/app/build.gradle.kts +5 -0
- /package/templates/{ui-compose → compose}/app/src/main/AndroidManifest.xml +0 -0
- /package/templates/{ui-compose/app/src/main/java → compose/app/src/main/kotlin}/com/example/template/MainActivity.kt +0 -0
- /package/templates/compose-library/library/src/main/{java → kotlin}/com/example/template/ExampleComponent.kt +0 -0
- /package/templates/mobile-compose-navigation/app/src/main/{java → kotlin}/com/example/template/MainActivity.kt +0 -0
- /package/templates/tv-compose/app/src/main/{java → kotlin}/com/example/template/MainActivity.kt +0 -0
- /package/templates/{ui-views → views}/app/src/main/AndroidManifest.xml +0 -0
- /package/templates/{ui-views/app/src/main/java → views/app/src/main/kotlin}/com/example/template/MainActivity.kt +0 -0
- /package/templates/{ui-views → views}/app/src/main/res/layout/activity_main.xml +0 -0
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@ The generated project is **clean** and follows modern best practices. It include
|
|
|
62
62
|
* `npm run dev`: High-speed development loop. Watches code and auto-deploys via `--continuous` and `--configuration-cache`.
|
|
63
63
|
* `npm run build`: Generates a production release APK.
|
|
64
64
|
* `npm run clean:deep`: Purges all build artifacts and Gradle cache to reclaim disk space.
|
|
65
|
+
* `npm run lsp:sync`: (Neovim/LSP users) Compiles classes to help the language server index dependencies.
|
|
65
66
|
* `npm test`: Runs unit tests.
|
|
66
67
|
|
|
67
68
|
### 📱 ADB Scripts (Wireless Debugging)
|
|
@@ -36,6 +36,9 @@ export async function generateProject(options) {
|
|
|
36
36
|
logger.info(`Applying ${uiType} template...`);
|
|
37
37
|
await fs.copy(uiTemplate, projectPath, { overwrite: true });
|
|
38
38
|
}
|
|
39
|
+
else {
|
|
40
|
+
throw new Error(`UI template not found: ${uiType} at ${uiTemplate}`);
|
|
41
|
+
}
|
|
39
42
|
// 5. Patch Configuration
|
|
40
43
|
logger.info(`Patching configuration...`);
|
|
41
44
|
const packageName = `com.example.${projectName.toLowerCase().replace(/[^a-z0-9]/g, '')}`;
|
|
@@ -60,7 +63,7 @@ export async function generateProject(options) {
|
|
|
60
63
|
});
|
|
61
64
|
}
|
|
62
65
|
// Handle Source Code Relocation
|
|
63
|
-
const srcBase = path.join(projectPath, moduleName, 'src/main/
|
|
66
|
+
const srcBase = path.join(projectPath, moduleName, 'src/main/kotlin');
|
|
64
67
|
const oldPackagePath = path.join(srcBase, 'com/example/template');
|
|
65
68
|
const newPackagePath = path.join(srcBase, ...packageName.split('.'));
|
|
66
69
|
if (fs.existsSync(oldPackagePath)) {
|
|
@@ -88,6 +91,7 @@ export async function generateProject(options) {
|
|
|
88
91
|
"lint": `./gradlew lint`,
|
|
89
92
|
"clean": `./gradlew clean`,
|
|
90
93
|
"clean:deep": "rm -rf .gradle app/build build library/build",
|
|
94
|
+
"lsp:sync": "./gradlew classes",
|
|
91
95
|
"help": `./gradlew --help`,
|
|
92
96
|
"adb": "node scripts/adb.js",
|
|
93
97
|
"adb:devices": "npm run adb devices",
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/tv-compose/app/src/main/{java → kotlin}/com/example/template/MainActivity.kt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|