project: Gradle 6 (#1990)

project: Gradle 6

Co-authored-by: null <openosrs.github@gmail.com>
This commit is contained in:
Owain van Brakel
2019-11-10 19:00:20 +01:00
committed by GitHub
23 changed files with 182 additions and 123 deletions

View File

@@ -28,29 +28,4 @@ jobs:
PULL_REQUEST_TITLE: 'project: Update gradle wrapper' PULL_REQUEST_TITLE: 'project: Update gradle wrapper'
PULL_REQUEST_BODY: This is an auto-generated PR with an updated gradle version PULL_REQUEST_BODY: This is an auto-generated PR with an updated gradle version
COMMIT_MESSAGE: 'project: Update gradle wrapper' COMMIT_MESSAGE: 'project: Update gradle wrapper'
PULL_REQUEST_LABELS: automated-pull-request, gradle
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Update Gradle dependencies
run: ./gradlew useLatestVersions --console=plain
- name: Create Gradle dependencies update Pull Request
uses: Owain94/create-pull-request@master
env:
GITHUB_TOKEN: ${{ secrets.OpenOSRS }}
PULL_REQUEST_BRANCH: GRADLE-DEPENDENCY-UPDATE
PULL_REQUEST_TITLE: 'project: Update gradle dependencies'
PULL_REQUEST_BODY: This is an auto-generated PR with an updated gradle dependencies versions
COMMIT_MESSAGE: 'project: Update gradle dependencies'
PULL_REQUEST_LABELS: automated-pull-request, gradle PULL_REQUEST_LABELS: automated-pull-request, gradle

View File

@@ -60,8 +60,8 @@ jobs:
- name: Testing - name: Testing
run: ./gradlew test --stacktrace --console=plain run: ./gradlew test --stacktrace --console=plain
checkstyle: checkstyleMain:
name: Checkstyle name: Checkstyle main
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -83,9 +83,32 @@ jobs:
- name: Checking code conventions - name: Checking code conventions
run: ./gradlew checkstyleMain --console=plain run: ./gradlew checkstyleMain --console=plain
checkstyleTest:
name: Checkstyle test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Assembling
run: ./gradlew assemble --console=plain
- name: Checking code conventions
run: ./gradlew checkstyleTest --console=plain
approve: approve:
name: Approve name: Approve
needs: [build, test, checkstyle] needs: [build, test, checkstyleMain, checkstyleTest]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@@ -52,8 +52,8 @@ jobs:
- name: Testing - name: Testing
run: ./gradlew test --stacktrace --console=plain run: ./gradlew test --stacktrace --console=plain
checkstyle: checkstyleMain:
name: Checkstyle name: Checkstyle main
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -75,6 +75,29 @@ jobs:
- name: Checking code conventions - name: Checking code conventions
run: ./gradlew checkstyleMain --console=plain run: ./gradlew checkstyleMain --console=plain
checkstyleTest:
name: Checkstyle test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Assembling
run: ./gradlew assemble --console=plain
- name: Checking code conventions
run: ./gradlew checkstyleTest --console=plain
update_draft_release: update_draft_release:
name: Draft release name: Draft release
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -28,9 +28,8 @@ import org.ajoberstar.grgit.Grgit
buildscript { buildscript {
repositories { repositories {
maven(url = "https://plugins.gradle.org/m2/") gradlePluginPortal()
maven(url = "https://raw.githubusercontent.com/open-osrs/hosting/master") maven(url = "https://raw.githubusercontent.com/open-osrs/hosting/master")
mavenLocal()
} }
dependencies { dependencies {
classpath(Plugins.grgitPlugin) classpath(Plugins.grgitPlugin)
@@ -42,10 +41,10 @@ buildscript {
plugins { plugins {
id(Plugins.testLogger.first) version Plugins.testLogger.second apply false id(Plugins.testLogger.first) version Plugins.testLogger.second apply false
id(Plugins.versions.first) version Plugins.versions.second id(Plugins.versions.first) version Plugins.versions.second
id(Plugins.buildScan.first) version Plugins.buildScan.second
id(Plugins.latestVersion.first) version Plugins.latestVersion.second id(Plugins.latestVersion.first) version Plugins.latestVersion.second
id(Plugins.grgit.first) version Plugins.grgit.second id(Plugins.grgit.first) version Plugins.grgit.second
checkstyle
application application
} }
@@ -60,48 +59,40 @@ fun isNonStable(version: String): Boolean {
} }
allprojects { allprojects {
apply<JavaLibraryPlugin>()
apply<MavenPlugin>()
apply<MavenPublishPlugin>()
group = "com.openosrs" group = "com.openosrs"
version = ProjectVersions.rlVersion version = ProjectVersions.rlVersion
}
subprojects {
repositories {
//mavenLocal()
jcenter()
maven(url = "https://mvnrepository.com/artifact")
maven(url = "https://repo.runelite.net")
maven(url = "https://raw.githubusercontent.com/open-osrs/hosting/master")
maven(url = "https://jitpack.io")
}
apply<JavaLibraryPlugin>()
apply<MavenPublishPlugin>()
apply(plugin = Plugins.testLogger.first)
project.extra["gitCommit"] = localGitCommit project.extra["gitCommit"] = localGitCommit
project.extra["gitCommitShort"] = localGitCommitShort project.extra["gitCommitShort"] = localGitCommitShort
project.extra["rootPath"] = rootDir.toString().replace("\\", "/") project.extra["rootPath"] = rootDir.toString().replace("\\", "/")
}
subprojects {
apply(plugin = Plugins.testLogger.first)
if (this.name != "runescape-client") { if (this.name != "runescape-client") {
apply(plugin = "checkstyle") apply(plugin = "checkstyle")
configure<CheckstyleExtension> {
sourceSets = setOf(project.sourceSets.main.get()) checkstyle {
configFile = file("${rootDir}/checkstyle/checkstyle.xml")
configProperties = mapOf("suppressionFile" to file("${rootDir}/checkstyle/suppressions.xml"))
maxWarnings = 0 maxWarnings = 0
toolVersion = "6.4.1" toolVersion = "8.25"
isShowViolations = true isShowViolations = true
isIgnoreFailures = false isIgnoreFailures = false
} }
} }
repositories {
mavenLocal()
maven(url = "http://repo1.maven.org/maven2")
maven(url = "http://repo.runelite.net")
maven(url = "http://repo.maven.apache.org/maven2")
maven(url = "https://raw.githubusercontent.com/open-osrs/hosting/master")
if (System.getenv("NEXUS-URL") != null) {
maven(url = System.getenv("NEXUS-URL"))
}
}
configure<PublishingExtension> { configure<PublishingExtension> {
repositories { repositories {
maven { maven {
@@ -120,6 +111,7 @@ subprojects {
} }
} }
tasks { tasks {
java { java {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
@@ -129,6 +121,13 @@ subprojects {
withType<JavaCompile> { withType<JavaCompile> {
options.encoding = "UTF-8" options.encoding = "UTF-8"
} }
withType<Checkstyle> {
group = "verification"
exclude("**/ScriptVarType.java")
exclude("**/LayoutSolver.java")
}
} }
} }
@@ -138,6 +137,8 @@ application {
tasks { tasks {
named<JavaExec>("run") { named<JavaExec>("run") {
group = "openosrs"
classpath = project(":runelite-client").sourceSets.main.get().runtimeClasspath classpath = project(":runelite-client").sourceSets.main.get().runtimeClasspath
} }

View File

@@ -28,7 +28,7 @@ plugins {
} }
repositories { repositories {
mavenCentral() jcenter()
maven(url = "https://raw.githubusercontent.com/open-osrs/hosting/master") maven(url = "https://raw.githubusercontent.com/open-osrs/hosting/master")
} }

View File

@@ -41,16 +41,15 @@ object Plugins {
val injectorPlugin = "com.openosrs:injector-plugin:1.0.2" val injectorPlugin = "com.openosrs:injector-plugin:1.0.2"
val testLogger = Pair("com.adarshr.test-logger", "2.0.0") val testLogger = Pair("com.adarshr.test-logger", "2.0.0")
val versions = Pair("com.github.ben-manes.versions", "0.27.0") val versions = Pair("com.github.ben-manes.versions", "0.27.0")
val buildScan = Pair("com.gradle.build-scan", "3.0") val latestVersion = Pair("se.patrikerdes.use-latest-versions", "0.2.13")
val latestVersion = Pair("se.patrikerdes.use-latest-versions", "0.2.12")
val grgit = Pair("org.ajoberstar.grgit", "4.0.0-rc.1") val grgit = Pair("org.ajoberstar.grgit", "4.0.0-rc.1")
val jarTest = Pair("com.github.hauner.jarTest", "1.0.1") val jarTest = Pair("com.github.hauner.jarTest", "1.0.1")
val shadow = Pair("com.github.johnrengelman.shadow", "5.1.0") val shadow = Pair("com.github.johnrengelman.shadow", "5.2.0")
} }
object Libraries { object Libraries {
private object Versions { private object Versions {
const val annotations = "17.0.0" const val annotations = "18.0.0"
const val antlr = "4.7.2" const val antlr = "4.7.2"
const val apacheCommonsCompress = "1.19" const val apacheCommonsCompress = "1.19"
const val apacheCommonsCsv = "1.7" const val apacheCommonsCsv = "1.7"
@@ -73,10 +72,10 @@ object Libraries {
const val jbsdiff = "1.0" const val jbsdiff = "1.0"
const val jclCore = "2.8" const val jclCore = "2.8"
const val jedis = "3.1.0" const val jedis = "3.1.0"
const val jna = "5.4.0" const val jna = "5.5.0"
const val jogamp = "2.3.2" const val jogamp = "2.3.2"
const val jopt = "5.0.4" const val jopt = "5.0.4"
const val jooq = "3.12.2" const val jooq = "3.12.3"
const val junit = "4.12" const val junit = "4.12"
const val jupiter = "5.6.0-M1" const val jupiter = "5.6.0-M1"
const val logback = "1.2.3" const val logback = "1.2.3"
@@ -87,22 +86,22 @@ object Libraries {
const val mavenPluginApi = "3.6.2" const val mavenPluginApi = "3.6.2"
const val minio = "6.0.11" const val minio = "6.0.11"
const val mockito = "3.1.0" const val mockito = "3.1.0"
const val mongodbDriverSync = "3.11.1" const val mongodbDriverSync = "3.11.2"
const val mysqlConnectorJava = "8.0.18" const val mysqlConnectorJava = "8.0.18"
const val naturalMouse = "2.0.2" const val naturalMouse = "2.0.2"
const val netty = "4.1.42.Final" const val netty = "4.1.43.Final"
const val okhttp3 = "4.2.2" const val okhttp3 = "4.2.2"
const val orangeExtensions = "1.0" const val orangeExtensions = "1.0"
const val petitparser = "2.2.0" const val petitparser = "2.2.0"
const val plexus = "3.3.0" const val plexus = "3.3.0"
const val rxjava = "2.2.13" const val rxjava = "2.2.14"
const val rxrelay = "2.1.1" const val rxrelay = "2.1.1"
const val scribejava = "6.9.0" const val scribejava = "6.9.0"
const val sisu = "0.3.3" const val sisu = "0.3.4"
const val sentry = "1.7.28" const val sentry = "1.7.28"
const val slf4j = "1.7.28" const val slf4j = "1.7.29"
const val springJdbc = "5.2.0.RELEASE" const val springJdbc = "5.2.1.RELEASE"
const val springboot = "2.2.0.RELEASE" const val springboot = "2.2.1.RELEASE"
const val sql2o = "1.6.0" const val sql2o = "1.6.0"
const val substance = "8.0.02" const val substance = "8.0.02"
const val trident = "1.5.00" const val trident = "1.5.00"

View File

@@ -53,6 +53,10 @@ dependencies {
tasks { tasks {
processTestResources { processTestResources {
finalizedBy("filterTestResources")
}
register<Copy>("filterTestResources") {
val tokens = mapOf( val tokens = mapOf(
"rs.version" to ProjectVersions.rsversion.toString(), "rs.version" to ProjectVersions.rsversion.toString(),
"cache.version" to ProjectVersions.cacheversion.toString() "cache.version" to ProjectVersions.cacheversion.toString()
@@ -62,8 +66,10 @@ tasks {
from("src/test/resources") { from("src/test/resources") {
include("cache.properties") include("cache.properties")
filter<ReplaceTokens>("tokens" to tokens)
} }
into("${buildDir}/resources/test")
filter(ReplaceTokens::class, "tokens" to tokens)
filteringCharset = "UTF-8"
} }
} }

View File

@@ -24,18 +24,19 @@
*/ */
package net.runelite.cache; package net.runelite.cache;
import com.google.common.io.FileWriteMode;
import com.google.common.io.Files; import com.google.common.io.Files;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.ByteArrayOutputStream; import java.io.IOException;
import java.io.ByteArrayInputStream;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import javax.sound.sampled.AudioFileFormat;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import net.runelite.cache.definitions.loaders.sound.SoundEffectTrackLoader; import net.runelite.cache.definitions.loaders.sound.SoundEffectTrackLoader;
import net.runelite.cache.definitions.sound.SoundEffectTrackDefinition; import net.runelite.cache.definitions.sound.SoundEffectTrackDefinition;
import net.runelite.cache.fs.Archive; import net.runelite.cache.fs.Archive;
@@ -48,11 +49,6 @@ import org.junit.rules.TemporaryFolder;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import javax.sound.sampled.AudioFileFormat;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
public class SoundEffectsDumperTest public class SoundEffectsDumperTest
{ {
private static final Logger logger = LoggerFactory.getLogger(SoundEffectsDumperTest.class); private static final Logger logger = LoggerFactory.getLogger(SoundEffectsDumperTest.class);

View File

@@ -28,8 +28,8 @@
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd"> "https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker"> <module name="Checker">
<module name="SuppressionCommentFilter"/>
<module name="TreeWalker"> <module name="TreeWalker">
<module name="SuppressionCommentFilter"/>
<module name="LeftCurly"> <module name="LeftCurly">
<property name="option" value="nl"/> <property name="option" value="nl"/>
</module> </module>
@@ -58,6 +58,6 @@
<property name="message" value="Newline should not be between else and if"/> <property name="message" value="Newline should not be between else and if"/>
</module> </module>
<module name="SuppressionFilter"> <module name="SuppressionFilter">
<property name="file" value="${suppressionFile}"/> <property name="file" value="${config_loc}/suppressions.xml"/>
</module> </module>
</module> </module>

View File

@@ -24,11 +24,10 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<!DOCTYPE suppressions PUBLIC <!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.1//EN" "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_1.dtd"> "https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions> <suppressions>
<suppress files="RuntimeTypeAdapterFactory\.java" checks="[a-zA-Z0-9]*"/> <suppress files="RuntimeTypeAdapterFactory\.java" checks="[a-zA-Z0-9]*"/>
<suppress files="[\\/]runescape-client[\\/]" checks="[a-zA-Z0-9]*"/>
<suppress files="[\\/]ScriptVarType[\./]" checks="[a-zA-Z0-9]*"/> <suppress files="[\\/]ScriptVarType[\./]" checks="[a-zA-Z0-9]*"/>
<suppress files="[\\/]RoomType[\./]" checks="[a-zA-Z0-9]*"/> <suppress files="[\\/]RoomType[\./]" checks="[a-zA-Z0-9]*"/>
<suppress files="[\\/]LayoutSolver[\./]" checks="[a-zA-Z0-9]*"/> <suppress files="[\\/]LayoutSolver[\./]" checks="[a-zA-Z0-9]*"/>

View File

@@ -45,7 +45,7 @@ dependencies {
implementation(project(":runelite-api")) implementation(project(":runelite-api"))
implementation(project(":runescape-api")) implementation(project(":runescape-api"))
runtime(Libraries.slf4jSimple) runtimeOnly(Libraries.slf4jSimple)
testImplementation(deobjars) testImplementation(deobjars)
testImplementation(Libraries.junit) testImplementation(Libraries.junit)
@@ -60,22 +60,34 @@ tasks {
) )
processResources { processResources {
finalizedBy("filterResources")
}
register<Copy>("filterResources") {
inputs.properties(tokens) inputs.properties(tokens)
from("src/main/resources") { from("src/main/resources") {
include("deob.properties") include("deob.properties")
filter<ReplaceTokens>("tokens" to tokens)
} }
into("${buildDir}/resources/main")
filter(ReplaceTokens::class, "tokens" to tokens)
filteringCharset = "UTF-8"
} }
processTestResources { processTestResources {
finalizedBy("filterTestResources")
}
register<Copy>("filterTestResources") {
inputs.properties(tokens) inputs.properties(tokens)
from("src/test/resources") { from("src/test/resources") {
include("deob-test.properties") include("deob-test.properties")
filter<ReplaceTokens>("tokens" to tokens)
} }
into("${buildDir}/resources/test")
filter(ReplaceTokens::class, "tokens" to tokens)
filteringCharset = "UTF-8"
} }
} }

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@@ -48,6 +48,10 @@ dependencies {
tasks { tasks {
processResources { processResources {
finalizedBy("filterResources")
}
register<Copy>("filterResources") {
val tokens = mapOf( val tokens = mapOf(
"projectver" to ProjectVersions.rlVersion, "projectver" to ProjectVersions.rlVersion,
"rsver" to ProjectVersions.rsversion.toString(), "rsver" to ProjectVersions.rsversion.toString(),
@@ -58,8 +62,10 @@ tasks {
from("src/main/resources") { from("src/main/resources") {
include("runelite.properties") include("runelite.properties")
filter<ReplaceTokens>("tokens" to tokens)
} }
into("${buildDir}/resources/main")
filter(ReplaceTokens::class, "tokens" to tokens)
filteringCharset = "UTF-8"
} }
} }

View File

@@ -49,7 +49,7 @@ injector {
} }
artifacts { artifacts {
add("runtime", tasks.inject.get().output) { add("runtimeOnly", tasks.inject.get().output) {
builtBy(tasks.inject) builtBy(tasks.inject)
} }
} }

View File

@@ -27,12 +27,6 @@ import org.apache.tools.ant.filters.ReplaceTokens
import java.util.Date import java.util.Date
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
buildscript {
dependencies {
classpath(gradleApi())
}
}
plugins { plugins {
id(Plugins.shadow.first) version Plugins.shadow.second id(Plugins.shadow.first) version Plugins.shadow.second
java java
@@ -119,8 +113,10 @@ tasks {
} }
processResources { processResources {
finalizedBy("filterResources")
}
register<Copy>("filterResources") {
val tokens = mapOf( val tokens = mapOf(
"project.version" to ProjectVersions.rlVersion, "project.version" to ProjectVersions.rlVersion,
"rs.version" to ProjectVersions.rsversion.toString(), "rs.version" to ProjectVersions.rsversion.toString(),
@@ -133,13 +129,14 @@ tasks {
from("src/main/resources") { from("src/main/resources") {
include("open.osrs.properties") include("open.osrs.properties")
filter<ReplaceTokens>("tokens" to tokens)
} }
into("${buildDir}/resources/main")
filter(ReplaceTokens::class, "tokens" to tokens)
filteringCharset = "UTF-8"
} }
jar { jar {
manifest { manifest {
attributes(mutableMapOf("Main-Class" to "net.runelite.client.RuneLite")) attributes(mutableMapOf("Main-Class" to "net.runelite.client.RuneLite"))
} }
@@ -148,4 +145,16 @@ tasks {
shadowJar { shadowJar {
archiveClassifier.set("shaded") archiveClassifier.set("shaded")
} }
withType<BootstrapTask> {
group = "openosrs"
}
register<JavaExec>("RuneLite.main()") {
group = "openosrs"
classpath = project.sourceSets.main.get().runtimeClasspath
main = "net.runelite.client.RuneLite"
}
} }

View File

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

View File

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

View File

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

View File

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

View File

@@ -35,7 +35,6 @@ import net.runelite.api.MessageNode;
import net.runelite.api.events.ChatMessage; import net.runelite.api.events.ChatMessage;
import net.runelite.client.config.ChatColorConfig; import net.runelite.client.config.ChatColorConfig;
import net.runelite.client.config.OpenOSRSConfig; import net.runelite.client.config.OpenOSRSConfig;
import net.runelite.client.eventbus.EventBus;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@@ -33,7 +33,6 @@ import net.runelite.api.ChatMessageType;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.ItemID; import net.runelite.api.ItemID;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuEntry;
import net.runelite.api.events.ChatMessage; import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.MenuOptionClicked; import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;

View File

@@ -25,6 +25,10 @@
rootProject.name = "OpenOSRS" rootProject.name = "OpenOSRS"
plugins {
id("com.gradle.enterprise").version("3.0")
}
include(":http-api") include(":http-api")
include(":cache") include(":cache")
include(":runelite-api") include(":runelite-api")

View File

@@ -23,11 +23,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
repositories {
mavenCentral()
maven(url = "https://jitpack.io")
}
description = "RuneLite Wiki scraper" description = "RuneLite Wiki scraper"
dependencies { dependencies {
@@ -50,18 +45,24 @@ dependencies {
tasks { tasks {
register<JavaExec>("npcStatsScrape") { register<JavaExec>("npcStatsScrape") {
group = "openosrs"
classpath = project.sourceSets.main.get().runtimeClasspath classpath = project.sourceSets.main.get().runtimeClasspath
main = "net.runelite.data.App" main = "net.runelite.data.App"
args(listOf("npcStats", rootProject.file("./runelite-client/src/main/resources/").absolutePath)) args(listOf("npcStats", rootProject.file("./runelite-client/src/main/resources/").absolutePath))
} }
register<JavaExec>("itemStatsScrape") { register<JavaExec>("itemStatsScrape") {
group = "openosrs"
classpath = project.sourceSets.main.get().runtimeClasspath classpath = project.sourceSets.main.get().runtimeClasspath
main = "net.runelite.data.App" main = "net.runelite.data.App"
args(listOf("itemStats", rootProject.file("./runelite-client/src/main/resources/").absolutePath)) args(listOf("itemStats", rootProject.file("./runelite-client/src/main/resources/").absolutePath))
} }
register<JavaExec>("itemLimitsScrape") { register<JavaExec>("itemLimitsScrape") {
group = "openosrs"
classpath = project.sourceSets.main.get().runtimeClasspath classpath = project.sourceSets.main.get().runtimeClasspath
main = "net.runelite.data.App" main = "net.runelite.data.App"
args(listOf("itemLimits", rootProject.file("./runelite-client/src/main/resources/").absolutePath)) args(listOf("itemLimits", rootProject.file("./runelite-client/src/main/resources/").absolutePath))