Gradle: build.gradle / build.gradle.kts — group = '...' */
| 579 | |
| 580 | /* Gradle: build.gradle / build.gradle.kts — group = '...' */ |
| 581 | static void parse_build_gradle(const char *source, int source_len, const char *rel_path, |
| 582 | cbm_pkg_entries_t *entries) { |
| 583 | const char *end = source + source_len; |
| 584 | /* Look for group = '...' or group '...' or group = "..." */ |
| 585 | const char *val = find_line_value(source, source_len, "group"); |
| 586 | if (!val) { |
| 587 | return; |
| 588 | } |
| 589 | char *group = extract_quoted(val, end); |
| 590 | if (!group) { |
| 591 | return; |
| 592 | } |
| 593 | char *dir = path_dirname(rel_path); |
| 594 | /* Check for src/main/java or src/main/kotlin */ |
| 595 | char entry[PKGMAP_PATH_BUF]; |
| 596 | snprintf(entry, sizeof(entry), "%s%ssrc/main/java", dir[0] ? dir : "", dir[0] ? "/" : ""); |
| 597 | pkg_entries_push(entries, group, strdup(entry)); |
| 598 | free(dir); |
| 599 | } |
| 600 | |
| 601 | /* Elixir: mix.exs — app: :name */ |
| 602 | static void parse_mix_exs(const char *source, int source_len, const char *rel_path, |
no test coverage detected