readAndroidApplicationID reads the applicationId from app/build.gradle or app/build.gradle.kts.
(dir string)
| 682 | |
| 683 | // readAndroidApplicationID reads the applicationId from app/build.gradle or app/build.gradle.kts. |
| 684 | func readAndroidApplicationID(dir string) string { |
| 685 | for _, name := range []string{ |
| 686 | filepath.Join("app", "build.gradle"), |
| 687 | filepath.Join("app", "build.gradle.kts"), |
| 688 | } { |
| 689 | if data, err := os.ReadFile(filepath.Join(dir, name)); err == nil { |
| 690 | if id := extractGradleApplicationID(string(data)); id != "" { |
| 691 | return id |
| 692 | } |
| 693 | } |
| 694 | } |
| 695 | return "" |
| 696 | } |
| 697 | |
| 698 | // detectionFriendlyAppType returns a concise label for the detection summary display. |
| 699 | func detectionFriendlyAppType(qsType string) string { |
no test coverage detected