aboutsummaryrefslogtreecommitdiff
path: root/src/test/groovy
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2021-10-30 00:26:59 +0300
committerGitHub <noreply@github.com>2021-10-29 22:26:59 +0100
commit587db4abae792ef4467c889cabc9a699723e6785 (patch)
tree9e1aa3f597670a1fb8d29783545666374ec79a0b /src/test/groovy
parente409f13b8c0f24d9b324741169c7e889256c26fc (diff)
downloadarchitectury-loom-587db4abae792ef4467c889cabc9a699723e6785.tar.gz
architectury-loom-587db4abae792ef4467c889cabc9a699723e6785.tar.bz2
architectury-loom-587db4abae792ef4467c889cabc9a699723e6785.zip
Add localRuntime and modLocalRuntime configurations (#526)
Closes #481. Co-authored-by: modmuss50 <modmuss50@gmail.com>
Diffstat (limited to 'src/test/groovy')
-rw-r--r--src/test/groovy/net/fabricmc/loom/test/integration/LocalRuntimeTest.groovy53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/test/groovy/net/fabricmc/loom/test/integration/LocalRuntimeTest.groovy b/src/test/groovy/net/fabricmc/loom/test/integration/LocalRuntimeTest.groovy
new file mode 100644
index 00000000..1835ef27
--- /dev/null
+++ b/src/test/groovy/net/fabricmc/loom/test/integration/LocalRuntimeTest.groovy
@@ -0,0 +1,53 @@
+/*
+ * This file is part of fabric-loom, licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2018-2021 FabricMC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package net.fabricmc.loom.test.integration
+
+import net.fabricmc.loom.test.util.GradleProjectTestTrait
+import spock.lang.Specification
+import spock.lang.Unroll
+
+import static net.fabricmc.loom.test.LoomTestConstants.STANDARD_TEST_VERSIONS
+import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
+
+class LocalRuntimeTest extends Specification implements GradleProjectTestTrait {
+ @Unroll
+ def "build (gradle #version)"() {
+ setup:
+ def gradle = gradleProject(project: "localRuntime", version: version)
+
+ when:
+ def result = gradle.run(tasks: ["build", "publishToMavenLocal"])
+
+ then:
+ result.task(":build").outcome == SUCCESS
+ def pomFile = new File(gradle.getProjectDir(), "build/publications/mavenJava/pom-default.xml")
+ def pom = pomFile.text
+ !pom.contains("fabric-api")
+ !pom.contains("enigma")
+
+ where:
+ version << STANDARD_TEST_VERSIONS
+ }
+}