Skip to content

Commit

Permalink
Merge :integration_tests:agp:testsupport into :integration_tests:agp
Browse files Browse the repository at this point in the history
AGP is now able to merge test manifests,
so it is no longer needed to have two modules.
  • Loading branch information
MGaetan89 committed Nov 10, 2024
1 parent 9887c08 commit 3ee772b
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 37 deletions.
1 change: 0 additions & 1 deletion integration_tests/agp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies {
// Testing dependencies
testImplementation(project(":testapp"))
testImplementation(project(":robolectric"))
testImplementation(project(":integration_tests:agp:testsupport"))

testImplementation(libs.junit4)
testImplementation(libs.androidx.test.core)
Expand Down
6 changes: 4 additions & 2 deletions integration_tests/agp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest>
<application />
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity android:name="TestActivity"/>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.robolectric.integrationtests.agp.testsupport;
package org.robolectric.integrationtests.agp;

import android.app.Activity;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,12 @@
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.integrationtests.agp.testsupport.TestActivity;

/**
* Test asserting that test-only activities can be declared in a dependency project's manifest as a
* workaround for the fact that Android Gradle Plugin doesn't merge the test manifest (as of 3.4).
*
* <p>When http://issuetracker.google.com/issues/127986458 is fixed, we can collapse {@code
* :integration_tests:agp:testsupport} back into {@code :integration_tests:agp}.
*/
@RunWith(AndroidJUnit4.class)
public class TestActivityTest {

@Test
public void testActivitiesCanBeDeclaredInADependencyLibrary() throws Exception {
public void testActivitiesCanBeDeclaredInADependencyLibrary() {
ActivityScenario.launch(TestActivity.class);
}
}
17 changes: 0 additions & 17 deletions integration_tests/agp/testsupport/build.gradle.kts

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ include(
":annotations",
":errorprone",
":integration_tests:agp",
":integration_tests:agp:testsupport",
":integration_tests:androidx",
":integration_tests:androidx_test",
":integration_tests:ctesque",
Expand Down

0 comments on commit 3ee772b

Please sign in to comment.