From 9f2a3eda1b96d98cf6b71de85fe8adeb4fc8890b Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Sat, 2 Mar 2024 16:15:25 +1100 Subject: [PATCH] Try to exclude module-info --- commonmark-android-test/app/build.gradle | 25 ++++++++++++------- .../app/src/main/AndroidManifest.xml | 2 +- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/commonmark-android-test/app/build.gradle b/commonmark-android-test/app/build.gradle index 5b7cc4cd..2ced8983 100644 --- a/commonmark-android-test/app/build.gradle +++ b/commonmark-android-test/app/build.gradle @@ -28,15 +28,22 @@ android { // we add other modules sources in order for lint to process them (lint operates on sources) sourceSets { main { - java.srcDirs += [ - '../../commonmark', - '../../commonmark-ext-autolink', - '../../commonmark-ext-gfm-strikethrough', - '../../commonmark-ext-gfm-tables', - '../../commonmark-ext-heading-anchor', - '../../commonmark-ext-ins', - '../../commonmark-ext-yaml-front-matter' - ].collect { "$it/src/main/java" } + java { + [ + '../../commonmark', + '../../commonmark-ext-autolink', + '../../commonmark-ext-gfm-strikethrough', + '../../commonmark-ext-gfm-tables', + '../../commonmark-ext-heading-anchor', + '../../commonmark-ext-ins', + '../../commonmark-ext-yaml-front-matter' + ].forEach { d -> + // don't include module-info files, otherwise we get + // "too many module declarations found" + PatternSet patternSet = new PatternSet().exclude('**/module-info.java') + srcDirs += fileTree("$d/src/main/java").matching(patternSet) + } + } } } } diff --git a/commonmark-android-test/app/src/main/AndroidManifest.xml b/commonmark-android-test/app/src/main/AndroidManifest.xml index 0343d4fd..48652056 100644 --- a/commonmark-android-test/app/src/main/AndroidManifest.xml +++ b/commonmark-android-test/app/src/main/AndroidManifest.xml @@ -1,3 +1,3 @@ - +