Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Nuke McTester
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMorpheus committed May 30, 2020
1 parent d1daf92 commit 1cfa9fa
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 1,746 deletions.
10 changes: 1 addition & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
sudo: required
dist: trusty

services:
- docker

language: java
jdk:
- openjdk8
Expand All @@ -13,15 +10,10 @@ git:
submodules: false
before_install:
- scripts/travis-initialize-submodules
- scripts/run-xvfb

install: ./gradlew setupDecompWorkspace
script: DISPLAY=:99 ./gradlew build runMcTester --stacktrace
after_failure: scripts/upload
script: ./gradlew build

notifications:
email: false

env:
- MCTESTER_UPLOAD_URL="https://openwhisk.ng.bluemix.net/api/v1/web/aa1ronham%40gmail.com_dev/default/image-upload.json"

85 changes: 0 additions & 85 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@ buildscript {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
classpath 'gradle.plugin.org.spongepowered:spongegradle:0.8.1'
classpath 'org.spongepowered:mixingradle:0.5-SNAPSHOT'
classpath mcTesterDep
}
}

plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.30'
}
repositories {
mavenLocal()
}
Expand Down Expand Up @@ -68,7 +64,6 @@ ext.implementationId = "spongeforge"
apply from: common.file('gradle/implementation.gradle')

version = "$minecraft.version-$forgeBuild-$implementationVersion"
apply plugin: 'org.spongepowered.mctester'



Expand All @@ -89,10 +84,6 @@ dependencies {
runtime testmods
}

test {
systemProperty "org.lwjgl.util.Debug", "true"
}

compileJava {
options.compilerArgs += [ "-Atokens=FORGE=$forgeBuild;FML=$forgeBuild" ]
}
Expand Down Expand Up @@ -191,82 +182,6 @@ uploadArchives {

apply from: 'changelog.gradle'

dependencies {
testCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testCompile "org.jetbrains.kotlinx:kotlinx-coroutines-core:0.23.4"
testCompile "org.jetbrains.kotlin:kotlin-reflect:1.3.0"
testCompile "org.apache.logging.log4j:log4j-core:2.8.1"
}

compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}

license.include '**/*.kt'

// Based on https://www.petrikainulainen.net/programming/gradle/getting-started-with-gradle-integration-testing/

def newFiles = (tasks.shadowDevJar.outputs.files + ((sourceSets.test.compileClasspath - tasks.jar.outputs.files))).minus(project(":SpongeCommon").tasks.jar.outputs.files)

sourceSets {
integrationTest {
java {
// This is a terrible hack to get McTester to work in development
// We want to include the following:
// * Dependencies from the 'test' sourceset
// * Deobfuscated (dev jar) classes
//
// We do NOT want to include:
// * Reobfuscated classess
//
// To that end, we explicitly include the output of 'shadowDevJar' and 'test.compileClasspath',
// while exlucding the outputs of the SpongeCommon and SpongeForge regular (obfuscated) jars

// Eventually, this should no longer be necessary once McTester supports obfuscated Sponge jars
// For the time being, we're stuck with this

compileClasspath += tasks.shadowDevJar.outputs.files + sourceSets.test.compileClasspath
runtimeClasspath += tasks.shadowDevJar.outputs.files + sourceSets.test.compileClasspath
//compileClasspath += newFiles
//runtimeClasspath += newFiles

srcDirs += file('src/integration-test/java')
}
kotlin {

srcDirs += file('src/integration-test/kotlin')
}
resources.srcDir file('src/integration-test/resources')
}
}

dependencies {
integrationTestCompile common.sourceSets.test.output
}

configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}

sourceSets.integrationTest.compileClasspath -= (tasks.jar.outputs.files + project(":SpongeCommon").tasks.jar.outputs.files)
sourceSets.integrationTest.runtimeClasspath -= (tasks.jar.outputs.files + project(":SpongeCommon").tasks.jar.outputs.files)


task runMcTester(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
}


compileIntegrationTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}

tasks.withType(JavaCompile) {
options.incremental = false
}
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ organization=SpongePowered

forgeVersion=14.23.5
forgeBuild=2838
mcTesterDep=org.spongepowered:mctester:0.10.9-SNAPSHOT

forgeGradlePlugin=net.minecraftforge.gradle.forge
org.gradle.jvmargs=-Xmx3G
2 changes: 0 additions & 2 deletions scripts/run-xvfb

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/upload

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1cfa9fa

Please sign in to comment.