Yixiang CHEN
02/04/2023, 4:12 PMSlackbot
02/04/2023, 4:12 PMEl Zhang
02/05/2023, 12:05 PMConfiguration
and collect some meta data from those dependencies that are added with it (must be Android AAR package). for example:
val caliperDependenciesConfiguration = project.configurations.maybeCreate("caliper").apply {
description = "..."
}
project.tasks.named("preBuild").configure {
doLast {
logger.lifecycle("preBuild doLast!")
val attributesAction =
Action<AttributeContainer> {
attribute(AndroidArtifacts.ARTIFACT_TYPE, "android-java-res")
}
val size = caliperDependenciesConfiguration.incoming
.artifactView {
this.lenient(true)
attributes(attributesAction)
}
.artifacts
.artifactFiles
.files
.size
logger.lifecycle("preBuild $size")
}
}
However it does not work as expected, any ideas about what’s wrong with above code snippet? Or at least how does it work in Java projects to collect dependencies data? Much thanks!Slackbot
02/05/2023, 3:15 PMSlackbot
02/05/2023, 3:36 PMSlackbot
02/05/2023, 6:36 PMSlackbot
02/06/2023, 10:13 AMSlackbot
02/06/2023, 1:47 PMSlackbot
02/06/2023, 8:46 PMSlackbot
02/06/2023, 8:49 PMSlackbot
02/07/2023, 4:23 AMSlackbot
02/07/2023, 1:04 PMSlackbot
02/07/2023, 1:50 PMJochen Hilgers
02/07/2023, 2:10 PMRoot project 'gradle-multi'
+--- Project ':app'
\--- Project ':testsuite'
The build.gradle
of the testsuite project looks like this:
plugins {
id 'java'
id 'jacoco'
}
repositories {
mavenCentral()
}
dependencies {
implementation project(':app')
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
}
test {
useJUnitPlatform()
}
:app
contains the class that got testet by a Unit Test from :testsuite
. The Tests are running fine but the coverage report is empty as it includes only the :testsuite
project.
Is there is a way to also include the :app
subproject? I feel like there is a simple way that I am just missingSlackbot
02/07/2023, 5:51 PMSlackbot
02/07/2023, 5:54 PMSlackbot
02/07/2023, 8:07 PMSlackbot
02/08/2023, 12:49 AMSlackbot
02/08/2023, 9:15 AMSlackbot
02/08/2023, 10:21 AMSlackbot
02/08/2023, 1:20 PMSlackbot
02/09/2023, 3:04 AMSlackbot
02/09/2023, 10:46 AMSlackbot
02/09/2023, 10:54 AMSlackbot
02/09/2023, 11:14 AMSlackbot
02/09/2023, 11:56 AMSlackbot
02/10/2023, 1:53 AMSlackbot
02/10/2023, 7:41 AMSlackbot
02/10/2023, 10:26 AMSlackbot
02/10/2023, 3:17 PM