import org.ajoberstar.grgit.Grgit buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "org.ajoberstar.grgit:grgit-gradle:3.1.1" } } plugins { id 'com.adarshr.test-logger' version '1.7.0' apply false id "com.github.ben-manes.versions" version "0.22.0" id "com.gradle.build-scan" version "2.4" id 'se.patrikerdes.use-latest-versions' version '0.2.8' } apply plugin: 'application' ext { grgit = Grgit.open(dir: "${rootProject.projectDir}") localGitCommit = grgit.head().id localGitCommitShort = grgit.head().getAbbreviatedId(7) localGitDirty = !grgit.status().clean // sets the minimum launcher version that is output for the bootstrapper launcherVersion = '2.0.3' // Dependencies versions annotations = '17.0.0' antlr = '4.7.2' apacheCommonsCompress = '1.19' apacheCommonsCsv = '1.7' apacheCommonsText = '1.8' asm = '7.2' commonsCli = '1.4' discord = '1.1' fernflower = '07082019' findbugs = '3.0.2' gson = '2.8.6' guava = '28.1-jre' guice = '4.2.2' h2 = '1.4.200' hamcrest = '2.2' httpcore = '4.4.12' httpmime = '4.5.10' javassist = '3.26.0-GA' javax = '1.3.2' javaxInject = '1' jbsdiff = '1.0' jclCore = '2.8' jedis = '3.1.0' jfoenix = '9.0.9' jna = '5.4.0' jogamp = '2.3.2' jopt = '5.0.4' jooq = '3.12.1' junit = '4.12' jupiter = '5.5.2' logback = '1.2.3' lombok = '1.18.10' mapstruct = '1.3.1.Final' mariadbJdbc = '2.5.1' mavenPluginAnnotations = '3.6.0' mavenPluginApi = '3.6.2' minio = '6.0.11' mockito = '3.1.0' mongodbDriverSync = '3.11.1' mysqlConnectorJava = '8.0.18' netty = '4.1.42.Final' okhttp3 = '4.2.2' orangeExtensions = '1.0' petitparser = '2.2.0' plexus = '3.3.0' rxjava = '2.2.13' rxrelay = '2.1.1' scribejava = '6.9.0' sisu = '0.3.3' slf4j = '1.7.28' springJdbc = '5.2.0.RELEASE' springboot = '2.2.0.RELEASE' sql2o = '1.6.0' substance = '8.0.02' trident = '1.5.00' } allprojects { apply plugin: 'maven' if (this.name != 'rs-client') apply plugin: 'checkstyle' group = 'com.openosrs' version = '1.5.37-SNAPSHOT' ext { rsversion = 184 cacheversion = 165 plusVersion = '2.1.8.0' gitCommit = localGitCommit gitCommitShort = localGitCommitShort gitDirty = localGitDirty rootPath = rootDir.toString().replace('\\', '/') injectedClassesPath = rootPath + "/injector-plugin/out/injected-client/" } } subprojects { apply plugin: 'com.adarshr.test-logger' apply plugin: 'java-library' apply plugin: 'maven' apply plugin: 'fernflower' apply plugin: 'maven-publish' sourceCompatibility = 1.8 targetCompatibility = 1.8 tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } tasks.withType(GroovyCompile).configureEach { options.incremental = true } publishing { repositories { maven { name = "runelite" url = uri("https://maven.pkg.github.com/open-osrs/runelite") credentials { username = System.getProperty("gpr_user") password = System.getProperty("gpr_key") } } } publications { gpr(MavenPublication) { from(components.java) } } } 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") } } } checkstyle { toolVersion = '6.4.1' sourceSets = [sourceSets.main] configFile = file("${rootDir}/checkstyle/checkstyle.xml") configProperties = [ "suppressionFile" : file("${rootDir}/checkstyle/suppressions.xml")] showViolations = true ignoreFailures = false maxWarnings = 0 } } wrapper { gradleVersion = '5.6.2' doLast { def optsEnvVar = "DEFAULT_JVM_OPTS" scriptFile.write scriptFile.text.replace("$optsEnvVar='\"-Xmx64m\" \"-Xms64m\"'", "$optsEnvVar='\"-Xmx4g\" \"-Xms2g\" \"-Dfile.encoding=UTF-8\"'") batchScript.write batchScript.text.replace("set $optsEnvVar=\"-Xmx64m\" \"-Xms64m\"", "set $optsEnvVar=\"-Xmx4g\" \"-Xms2g\" \"-Dfile.encoding=UTF-8\"") } } run { classpath = childProjects.client.sourceSets.main.runtimeClasspath mainClassName = "net.runelite.client.RuneLite" } def isNonStable = { String version -> def unstableKeyword = ['ALPHA', 'BETA', 'RC'].any { it -> version.toUpperCase().contains(it) } return unstableKeyword } dependencyUpdates { checkForGradleUpdate = false resolutionStrategy { componentSelection { all { if (isNonStable(candidate.version)) { reject() } } } } }