@@ -76,8 +76,7 @@ func DetectProject(dir string) DetectionResult {
7676 if data , ok := readFileContent (dir , "pubspec.yaml" ); ok {
7777 if strings .Contains (data , "sdk: flutter" ) {
7878 result .Detected = true
79- // android/ or ios/ present means a native project regardless of web/ directory.
80- // flutter create (default) has included web/ since Flutter 2.10, so web/ alone
79+ // Flutter create (default) has included web/ since Flutter 2.10, so web/ alone
8180 // is not a reliable signal for web-only intent.
8281 if dirExists (dir , "android" ) || dirExists (dir , "ios" ) {
8382 result .Framework = "flutter"
@@ -161,8 +160,7 @@ func DetectProject(dir string) DetectionResult {
161160 return result
162161 }
163162
164- // ── 10. Expo: app.json with top-level "expo" key, or legacy expo.json ────.
165- // create-expo-app has generated app.json (not expo.json) since SDK 46 (2022).
163+ // Create-expo-app has generated app.json (not expo.json) since SDK 46 (2022).
166164 // Check app.json first; fall back to expo.json for legacy projects.
167165 if isExpoProject (dir ) || fileExists (dir , "expo.json" ) {
168166 result .Framework = "expo"
@@ -320,16 +318,15 @@ func detectJavaFramework(content string) (framework string, port int) {
320318 strings .Contains (lower , "jakarta.ee" ) ||
321319 strings .Contains (lower , "javax.servlet" ) ||
322320 strings .Contains (lower , "jakarta.servlet" ) ||
323- // jakarta .platform:jakarta.jakartaee-api is the standard BOM for Jakarta EE 9+.
321+ // Jakarta .platform:jakarta.jakartaee-api is the standard BOM for Jakarta EE 9+.
324322 strings .Contains (lower , "jakarta.platform" ):
325323 return "java-ee" , 0
326324 default :
327325 return "vanilla-java" , 0
328326 }
329327}
330328
331- // isExpoProject returns true if app.json contains a top-level "expo" key.
332- // create-expo-app has generated app.json (not expo.json) since SDK 46 in 2022.
329+ // Create-expo-app has generated app.json (not expo.json) since SDK 46 in 2022.
333330func isExpoProject (dir string ) bool {
334331 data , err := os .ReadFile (filepath .Join (dir , "app.json" ))
335332 if err != nil {
@@ -349,13 +346,6 @@ func dirExists(dir, name string) bool {
349346 return err == nil && info .IsDir ()
350347}
351348
352- // isFlutterWeb returns true if the project has web platform support enabled.
353- // Kept for backwards compatibility; DetectProject uses dirExists for android/ios instead.
354- func isFlutterWeb (dir string ) bool {
355- _ , err := os .Stat (filepath .Join (dir , "web" , "index.html" ))
356- return err == nil
357- }
358-
359349// fileExists returns true if the named file exists in dir.
360350func fileExists (dir , name string ) bool {
361351 _ , err := os .Stat (filepath .Join (dir , name ))
0 commit comments