-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56aa3b2
commit 13fc528
Showing
27 changed files
with
698 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="All Tests" type="TestNG"> | ||
<shortenClasspath name="NONE" /> | ||
<useClassPathOnly /> | ||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" /> | ||
<option name="ALTERNATIVE_JRE_PATH" value="11" /> | ||
<option name="SUITE_NAME" value="" /> | ||
<option name="PACKAGE_NAME" value="" /> | ||
<option name="MAIN_CLASS_NAME" value="" /> | ||
<option name="METHOD_NAME" value="" /> | ||
<option name="GROUP_NAME" value="" /> | ||
<option name="TEST_OBJECT" value="PACKAGE" /> | ||
<option name="VM_PARAMETERS" value="-ea " /> | ||
<option name="PARAMETERS" value="" /> | ||
<option name="OUTPUT_DIRECTORY" value="" /> | ||
<option name="TEST_SEARCH_SCOPE"> | ||
<value defaultName="wholeProject" /> | ||
</option> | ||
<option name="PROPERTIES_FILE" value="" /> | ||
<properties /> | ||
<listeners /> | ||
<method v="2"> | ||
<option name="Maven.BeforeRunTask" enabled="true" file="$PROJECT_DIR$//pom.xml" goal="install -DskipTests" /> | ||
</method> | ||
</configuration> | ||
</component> |
19 changes: 19 additions & 0 deletions
19
integration-tests/src/test/kotlin/com/antwerkz/build/maven/GradleInvocationTest.kt
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,19 @@ | ||
package com.antwerkz.build.maven | ||
|
||
import org.testng.Assert.assertTrue | ||
import org.testng.annotations.Test | ||
|
||
class GradleInvocationTest : MavenTester() { | ||
@Test | ||
fun invokeGradle() { | ||
val testDir = initProject("projects/gradleInvoke") | ||
val (_, welcome) = setupAndInvoke(testDir) | ||
var string = welcome.toLogFormat() | ||
assertTrue(welcome.contains("[INFO] > hello, graven!"), string) | ||
|
||
val (_, packaging) = setupAndInvoke(testDir, goals = listOf("package")) | ||
string = packaging.toLogFormat() | ||
assertTrue(packaging.contains("[INFO] > hello, graven!"), string) | ||
assertTrue(packaging.contains("[INFO] > working hard"), string) | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
.../resources/maven/projects/doubleQuotes/src/main/kotlin/com/antwerkz/build/DoubleQuotes.kt
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,3 @@ | ||
package com.antwerkz.build | ||
|
||
class DoubleQuotes |
51 changes: 51 additions & 0 deletions
51
integration-tests/src/test/resources/maven/projects/gradleInvoke/build.gradle.kts
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,51 @@ | ||
buildscript { | ||
dependencies { | ||
classpath("org.apache.maven:maven-model:2.3.1") | ||
classpath("com.fasterxml.jackson.core:jackson-databind:1.0.0") | ||
} | ||
} | ||
|
||
plugins { | ||
id("dev.morphia.critter") version "${findProperty("critter.version")}" | ||
kotlin("jvm") version "1.6.0" | ||
`maven-publish` | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { | ||
url = uri("https://oss.sonatype.org/content/repositories/snapshots") | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("dev.morphia.morphia:morphia-core:1.2.3") | ||
testImplementation("org.testng:testng:${findProperty("testng.version")}") | ||
testImplementation("org.testcontainers:mongodb:${findProperty("testcontainers.version")}") | ||
} | ||
|
||
tasks.register("welcome") { | ||
doLast { | ||
println("hello, graven!") | ||
} | ||
} | ||
|
||
tasks.register("packaging") { | ||
doLast { | ||
println("working hard") | ||
} | ||
} | ||
|
||
tasks { | ||
test { | ||
useTestNG() | ||
} | ||
|
||
critter { | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile::class.java) { | ||
options.compilerArgs = listOf("-parameters") | ||
} |
3 changes: 3 additions & 0 deletions
3
integration-tests/src/test/resources/maven/projects/gradleInvoke/gradle.properties
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,3 @@ | ||
version = 0.1.0-SNAPSHOT | ||
morphia.version = 123 | ||
critter.version = 123 |
Binary file added
BIN
+58.4 KB
...on-tests/src/test/resources/maven/projects/gradleInvoke/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
...s/src/test/resources/maven/projects/gradleInvoke/gradle/wrapper/gradle-wrapper.properties
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,5 @@ | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
Oops, something went wrong.