Skip to content

Commit

Permalink
Un-ignore test, remove unecessary deprecations and restore hilt cover…
Browse files Browse the repository at this point in the history
…age exclusions
  • Loading branch information
tresat committed Nov 5, 2024
1 parent 9f803ed commit 7496864
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ private static void configureBadgingTasks(Project project, ApplicationAndroidCom
});
}

@SuppressWarnings("deprecation")
private static void disableUnnecessaryAndroidTests(Project project, LibraryAndroidComponentsExtension androidLibComponents) {
androidLibComponents.beforeVariants(androidLibComponents.selector().all(), it -> {
it.setEnableAndroidTest(it.getEnableAndroidTest() && project.getLayout().getProjectDirectory().file("src/androidTest").getAsFile().exists());
Expand Down Expand Up @@ -416,11 +415,12 @@ private static List<String> coverageExclusions() {
"**/R.class",
"**/R$*.class",
"**/BuildConfig.*",
"**/Manifest*.*"
"**/Manifest*.*",
"**/*_Hilt*.class",
"**/Hilt_*.class"
);
}

@SuppressWarnings("deprecation")
private static void configureJacoco(Project project, AndroidSoftware dslModel, CommonExtension<?, ?, ?, ?, ?, ?> android) {
if (dslModel.getTesting().getJacoco().getEnabled().get()) {
project.getLogger().info("JaCoCo is enabled in: " + project.getPath());
Expand Down Expand Up @@ -468,7 +468,7 @@ private static void configureJacoco(Project project, AndroidSoftware dslModel, C
.toGet(ScopedArtifact.CLASSES.INSTANCE, ignore -> allJars, ignore -> allDirectories);
});

project.getTasks().withType(Test.class, test -> {
project.getTasks().withType(Test.class).configureEach(test -> {
JacocoTaskExtension jacocoTaskExtension = test.getExtensions().getByType(JacocoTaskExtension.class);

// Required for JaCoCo + Robolectric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package org.gradle.api.experimental.kmp

import org.gradle.integtests.fixtures.AbstractBuildInitSpecification
import org.gradle.testkit.runner.GradleRunner
import org.junit.Ignore

@Ignore
class KotlinApplicationInitProjectSpec extends AbstractBuildInitSpecification {
@Override
protected String getEcosystemPluginId() {
Expand Down

0 comments on commit 7496864

Please sign in to comment.