File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/groovy/com/monits/gradle/sca Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ import java.util.zip.ZipFile
3333@CompileStatic
3434trait ClasspathAware {
3535
36+ // AGP 3.3 and 3.4 still generated plain text R java classes
37+ private static final List<String > AUTOGENERATED_CLASSES = [
38+ ' **/R.class' ,
39+ ' **/R$*.class' ,
40+ ' **/BuildConfig.class' ,
41+ ' **/BuildConfig$*.class' ,
42+ ]. asImmutable()
43+
3644 private static final String DEBUG_SOURCESET = ' debug'
3745 private static final String MAIN_SOURCESET = ' main'
3846 private static final String TEST_SOURCESET = ' test'
@@ -136,7 +144,7 @@ trait ClasspathAware {
136144 * @return FileCollection pointing to all interesting .class files
137145 */
138146 FileCollection getProjectClassTree(final Project proj, final String sourceSetName) {
139- proj. files( pathToCompiledClasses(proj, sourceSetName))
147+ proj. fileTree( dir : pathToCompiledClasses(proj, sourceSetName), excludes : AUTOGENERATED_CLASSES )
140148 }
141149
142150 private static FileTree getJarsForAarDependencies(final Project project) {
You can’t perform that action at this time.
0 commit comments