-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct bundled version of instrumentation libraries for the plugin
- Loading branch information
1 parent
c7513d2
commit ec19040
Showing
10 changed files
with
127 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
java | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation(gradleApi()) | ||
testImplementation("junit:junit:+") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
build-logic/src/test/java/FindInstrumentationVersionTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class FindInstrumentationVersionTests { | ||
@Test | ||
public void findCorrectVersionForSnapshotPlugin() { | ||
String actual = TasksKt.findInstrumentationVersion( | ||
"plugin-1.0-SNAPSHOT", | ||
"instrumentation-2.0-SNAPSHOT", | ||
"instrumentation-1.0" | ||
); | ||
|
||
assertEquals("instrumentation-2.0-SNAPSHOT", actual); | ||
} | ||
|
||
@Test | ||
public void findCorrectVersionForStablePluginAndStableInstrumentation() { | ||
String actual = TasksKt.findInstrumentationVersion( | ||
"plugin-1.0", | ||
"instrumentation-2.0", | ||
"instrumentation-1.0" | ||
); | ||
|
||
assertEquals("instrumentation-2.0", actual); | ||
} | ||
|
||
@Test | ||
public void findCorrectVersionForStablePluginAndSnapshotInstrumentation() { | ||
String actual = TasksKt.findInstrumentationVersion( | ||
"plugin-1.0", | ||
"instrumentation-2.0-SNAPSHOT", | ||
"instrumentation-1.0" | ||
); | ||
|
||
assertEquals("instrumentation-1.0", actual); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters