Skip to content

Commit

Permalink
Update to prepare for the build system checking PRs. (ldtteam#2582)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchermans authored Jul 2, 2018
1 parent 8e40eb9 commit 9067942
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 20 deletions.
17 changes: 4 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ buildscript {
}

plugins {
id "org.sonarqube" version "2.3"
id "com.matthewprenger.cursegradle" version "1.0.9"
}
repositories {
Expand All @@ -30,15 +29,6 @@ repositories {
}
}

sonarqube {
properties{
property "sonar.host.url", "http://home.kk-sc.de:9000"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.projectName", "Minecolonies"
property "sonar.branch", System.getenv()['TEAMCITY_BRANCH'] != null ? System.getenv()['TEAMCITY_BRANCH'] : System.getenv()['TRAVIS_BRANCH']
}
}

apply plugin: 'idea'
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'jacoco'
Expand Down Expand Up @@ -136,8 +126,7 @@ dependencies {
}

group = "com.minecolonies"
config.buildnumber = System.getenv()['BUILD_NUMBER'] != null ? System.getenv()['BUILD_NUMBER'] : System.getenv()['TRAVIS_BUILD_NUMBER']
version = "${config.minecraft_version}-${config.minecolonies_major}.${config.minecolonies_minor}.${config.buildnumber}"
version = config.minecraft_version.toString() + "-" + System.getenv()["Version"]
archivesBaseName = "minecolonies"

sourceCompatibility = '1.8'
Expand All @@ -148,7 +137,7 @@ minecraft {
version = config.minecraft_version + "-" + config.forge_version
runDir = "run"

mappings = "${config.minecolonies_mappings}"
mappings = "${config.mappings}"

replace "@VERSION@", project.version
replaceIn "util/constant/Constants.java"
Expand Down Expand Up @@ -196,6 +185,8 @@ jar {
from sourceSets.blockOut.output
from sourceSets.structures.output
from sourceSets.main.output

classifier = 'universal'

manifest {
attributes 'FMLAT': "minecolonies_at.cfg"
Expand Down
13 changes: 6 additions & 7 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Minecolonies gradle config file.
# Last update: 24.6.2018. Orion: Update buildscript to match new system.
#
#Sun Jan 24 19:17:22 CST 2016
# Minecraft / Forge.
minecraft_version=1.12.2
forge_version=14.23.3.2655
minecolonies_major=0
mappings=snapshot_20180108
#
# Dependencies
guidebook_version=2.0.1
guidebook_core_version=0.6.4
mantle_version=1.3.1.+
tinker_version=2.7.4.+
jei_version=4.8.5.138
c_b_version=14.0.128
minecolonies_minor=8
#deprecated, travis versioning instead
minecolonies_build=25

minecolonies_mappings=snapshot_20180108
21 changes: 21 additions & 0 deletions src/test/java/com/minecolonies/blockout/DummyTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.minecolonies.blockout;

import com.minecolonies.api.util.BlockPosUtil;
import net.minecraft.util.math.BlockPos;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.number.OrderingComparison.greaterThanOrEqualTo;

//TODO improve this test: check the value is correct, better edge cases
@RunWith(MockitoJUnitRunner.class)
public class DummyTest
{
@Test
public void ExecuteDummyTest()
{
assertThat("Dummy test", true);
}
}
18 changes: 18 additions & 0 deletions src/test/java/com/minecolonies/structures/DummyTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.minecolonies.structures;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;

import static org.hamcrest.MatcherAssert.assertThat;

//TODO improve this test: check the value is correct, better edge cases
@RunWith(MockitoJUnitRunner.class)
public class DummyTest
{
@Test
public void ExecuteDummyTest()
{
assertThat("Dummy test", true);
}
}

0 comments on commit 9067942

Please sign in to comment.