mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Update our dependencies to their latest versions (where possibly)
Also adds Guava as a dependency as version upgrading our dependencies resulted in the loss of the included Guava libraries
This commit is contained in:
		@@ -1,17 +0,0 @@
 | 
			
		||||
package com.gmail.nossr50;
 | 
			
		||||
 | 
			
		||||
import org.jetbrains.annotations.NotNull;
 | 
			
		||||
 | 
			
		||||
import java.io.File;
 | 
			
		||||
 | 
			
		||||
//TODO: Move generic test stuff here
 | 
			
		||||
public class TestUtil {
 | 
			
		||||
    public static void recursiveDelete(@NotNull File directoryToBeDeleted) {
 | 
			
		||||
        if (directoryToBeDeleted.isDirectory()) {
 | 
			
		||||
            for (File file : directoryToBeDeleted.listFiles()) {
 | 
			
		||||
                recursiveDelete(file);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        directoryToBeDeleted.delete();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,5 @@
 | 
			
		||||
package com.gmail.nossr50.database;
 | 
			
		||||
 | 
			
		||||
import com.gmail.nossr50.TestUtil;
 | 
			
		||||
import com.gmail.nossr50.database.flatfile.LeaderboardStatus;
 | 
			
		||||
import com.gmail.nossr50.datatypes.database.DatabaseType;
 | 
			
		||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
 | 
			
		||||
@@ -86,7 +85,7 @@ public class FlatFileDatabaseManagerTest {
 | 
			
		||||
 | 
			
		||||
    @AfterEach
 | 
			
		||||
    public void tearDown() {
 | 
			
		||||
        TestUtil.recursiveDelete(tempDir);
 | 
			
		||||
        recursiveDelete(tempDir);
 | 
			
		||||
        db = null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -844,4 +843,14 @@ public class FlatFileDatabaseManagerTest {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void recursiveDelete(@NotNull File directoryToBeDeleted) {
 | 
			
		||||
        if (directoryToBeDeleted.isDirectory()) {
 | 
			
		||||
            for (File file : directoryToBeDeleted.listFiles()) {
 | 
			
		||||
                recursiveDelete(file);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        directoryToBeDeleted.delete();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,5 @@
 | 
			
		||||
package com.gmail.nossr50.util.blockmeta;
 | 
			
		||||
 | 
			
		||||
import com.gmail.nossr50.TestUtil;
 | 
			
		||||
import com.gmail.nossr50.mcMMO;
 | 
			
		||||
import com.gmail.nossr50.util.BlockUtils;
 | 
			
		||||
import com.gmail.nossr50.util.compat.CompatibilityManager;
 | 
			
		||||
@@ -40,7 +39,7 @@ public class ChunkStoreTest {
 | 
			
		||||
 | 
			
		||||
    @AfterClass
 | 
			
		||||
    public static void tearDownClass() {
 | 
			
		||||
        TestUtil.recursiveDelete(tempDir);
 | 
			
		||||
        recursiveDelete(tempDir);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private World mockWorld;
 | 
			
		||||
@@ -440,4 +439,13 @@ public class ChunkStoreTest {
 | 
			
		||||
        Mockito.when(testBlock.getWorld()).thenReturn(mockWorld);
 | 
			
		||||
        return testBlock;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void recursiveDelete(@NotNull File directoryToBeDeleted) {
 | 
			
		||||
        if (directoryToBeDeleted.isDirectory()) {
 | 
			
		||||
            for (File file : directoryToBeDeleted.listFiles()) {
 | 
			
		||||
                recursiveDelete(file);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        directoryToBeDeleted.delete();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user