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 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/java');
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-droid",
3
- "version": "1.1.0",
3
+ "version": "1.1.3",
4
4
  "description": "The fastest way to start an Android project. No Studio required.",
5
5
  "author": "YELrhilassi",
6
6
  "license": "MIT",
@@ -33,6 +33,11 @@ android {
33
33
  kotlinOptions {
34
34
  jvmTarget = "1.8"
35
35
  }
36
+ sourceSets {
37
+ getByName("main") {
38
+ java.setSrcDirs(listOf("src/main/kotlin", "src/main/java"))
39
+ }
40
+ }
36
41
  buildFeatures {
37
42
  compose = true
38
43
  }
@@ -27,6 +27,11 @@ android {
27
27
  kotlinOptions {
28
28
  jvmTarget = "1.8"
29
29
  }
30
+ sourceSets {
31
+ getByName("main") {
32
+ java.setSrcDirs(listOf("src/main/kotlin", "src/main/java"))
33
+ }
34
+ }
30
35
  buildFeatures {
31
36
  compose = true
32
37
  }
@@ -29,6 +29,11 @@ android {
29
29
  kotlinOptions {
30
30
  jvmTarget = "1.8"
31
31
  }
32
+ sourceSets {
33
+ getByName("main") {
34
+ java.setSrcDirs(listOf("src/main/kotlin", "src/main/java"))
35
+ }
36
+ }
32
37
  buildFeatures {
33
38
  compose = true
34
39
  }
@@ -29,6 +29,11 @@ android {
29
29
  kotlinOptions {
30
30
  jvmTarget = "1.8"
31
31
  }
32
+ sourceSets {
33
+ getByName("main") {
34
+ java.setSrcDirs(listOf("src/main/kotlin", "src/main/java"))
35
+ }
36
+ }
32
37
  buildFeatures {
33
38
  compose = true
34
39
  }
@@ -29,6 +29,11 @@ android {
29
29
  kotlinOptions {
30
30
  jvmTarget = "1.8"
31
31
  }
32
+ sourceSets {
33
+ getByName("main") {
34
+ java.setSrcDirs(listOf("src/main/kotlin", "src/main/java"))
35
+ }
36
+ }
32
37
  buildFeatures {
33
38
  viewBinding = true
34
39
  }