Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('android::findLibraryName', () => {
});

it('returns the library name if declared with inside a build.gradle.kts file', () => {
expect(findLibraryName('/', '/valid/singlequotes')).toBe('justalibrary');
expect(findLibraryName('/', '/valid/gradlekts')).toBe('justalibrary');
});

it('returns the library name if defined inside codegenConfig', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export function findLibraryName(root: string, sourceDir: string) {
return undefined;
}

const match = buildGradleContents.match(/libraryName = ["'](.+)["']/);
const match =
buildGradleContents.match(/libraryName = ["'](.+)["']/) ??
buildGradleContents.match(/libraryName\.set\(["'](.+)["']\)/);
Comment thread
thymikee marked this conversation as resolved.
Outdated

if (match) {
return match[1];
Expand Down