This commit is contained in:
raoulvdberge
2020-10-18 22:11:27 +02:00
parent a0be8c53c6
commit 9d48419403
5 changed files with 33 additions and 1 deletions

5
Jenkinsfile vendored
View File

@@ -9,6 +9,9 @@ node {
stage('Cleanup') {
sh "./gradlew clean"
}
stage('Test') {
sh "./gradlew test"
}
stage('Build') {
sh "./gradlew build"
}
@@ -19,7 +22,7 @@ node {
stage('Publish artifacts') {
sh "./gradlew publish"
}
stage('SonarQube') {
stage('SonarQube analysis') {
withCredentials([string(credentialsId: 'SONAR_TOKEN', variable: 'SONAR_TOKEN')]) {
sh "./gradlew sonarqube -Dsonar.login=$SONAR_TOKEN"
}

View File

@@ -11,6 +11,7 @@ buildscript {
plugins {
id "org.sonarqube" version "3.0"
id 'info.solidsoft.pitest' version '1.5.1'
}
repositories {
@@ -33,6 +34,11 @@ sonarqube {
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'info.solidsoft.pitest'
pitest {
junit5PluginVersion = "0.12"
}
version = '1.9.8'
def env = System.getenv()
@@ -118,6 +124,10 @@ dependencies {
compileOnly 'mouse-tweaks:MouseTweaks:2.13:mc1.16.2'
runtimeOnly fg.deobf('crafting-tweaks:CraftingTweaks_1.16.2:12.1.0')
testImplementation('org.junit.jupiter:junit-jupiter-api:5.6.2')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.6.2')
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.16.1'
}
jar {
@@ -160,6 +170,10 @@ artifacts {
archives apiJar
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {

View File

@@ -123,4 +123,9 @@ public interface IStackList<T> {
*/
@Nonnull
IStackList<T> copy();
/**
* @return the amount of elements in this list
*/
int size();
}

View File

@@ -157,4 +157,9 @@ public class FluidStackList implements IStackList<FluidStack> {
return list;
}
@Override
public int size() {
return stacks.size();
}
}

View File

@@ -155,4 +155,9 @@ public class ItemStackList implements IStackList<ItemStack> {
return list;
}
@Override
public int size() {
return stacks.size();
}
}