gradle: Refactor and update to gradle 6

This commit is contained in:
Owain van Brakel
2019-11-10 01:42:11 +01:00
parent 7085ad14f3
commit 18021f6bed
22 changed files with 172 additions and 121 deletions

View File

@@ -216,7 +216,8 @@ public class GauntletPlugin extends Plugin
if (client.getGameState() != GameState.STARTING && client.getGameState() != GameState.UNKNOWN)
{
completeStartup = false;
clientThread.invoke(() -> {
clientThread.invoke(() ->
{
timer.initStates();
completeStartup = true;
});

View File

@@ -1194,7 +1194,9 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
glDrawable.swapBuffers();
}
catch (GLException ignored)
{ }
{
// Ignore
}
drawManager.processDrawComplete(this::screenshot);
}

View File

@@ -99,7 +99,8 @@ class NotesPanel extends PluginPanel
private void buildAddTab()
{
addTab = new MaterialTab(addIcon, tabGroup, new JPanel());
addTab.setOnSelectEvent(() -> {
addTab.setOnSelectEvent(() ->
{
notesManager.addPage();
return false;
});
@@ -178,7 +179,8 @@ class NotesPanel extends PluginPanel
final JMenuItem deleteMenuItem = new JMenuItem();
deleteMenuItem.setText(String.format("Delete note %s", name));
deleteMenuItem.addActionListener(e -> {
deleteMenuItem.addActionListener(e ->
{
if (JOptionPane.showConfirmDialog(getRootFrame(), String.format("Delete note page %s?", name), "Notes", YES_NO_OPTION) != YES_OPTION)
{
return;

View File

@@ -331,7 +331,8 @@ public class SwingUtil
button.setOpaque(true);
// Selecting the button option requires us to determine which parent element is the JOptionPane
button.addActionListener(e -> {
button.addActionListener(e ->
{
JComponent component = (JComponent) e.getSource();
while (component != null)
{
@@ -401,7 +402,8 @@ public class SwingUtil
dialog.setIconImage(ImageUtil.getResourceStreamFromClass(SwingUtil.class, "/openosrs.png"));
// Listen for value changes and close dialog when necessary
pane.addPropertyChangeListener(e -> {
pane.addPropertyChangeListener(e ->
{
String prop = e.getPropertyName();
if (dialog.isVisible()