2019-08-05 09:24:50 +02:00
|
|
|
// Aggregate Javadocs
|
|
|
|
buildscript {
|
|
|
|
repositories { jcenter() }
|
|
|
|
dependencies {
|
|
|
|
classpath 'com.netflix.nebula:gradle-aggregate-javadocs-plugin:2.2.+'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-18 20:13:05 +01:00
|
|
|
plugins {
|
|
|
|
id "java"
|
2018-12-19 18:24:33 +01:00
|
|
|
id "jacoco"
|
2019-01-03 11:52:01 +01:00
|
|
|
id "checkstyle"
|
2019-10-02 08:26:41 +02:00
|
|
|
id "org.sonarqube" version "2.8"
|
2019-05-01 10:16:51 +02:00
|
|
|
id "net.ltgt.apt" version "0.21"
|
2019-05-01 09:58:35 +02:00
|
|
|
id "net.ltgt.apt-idea" version "0.21"
|
2019-11-11 07:39:52 +01:00
|
|
|
id "com.github.johnrengelman.shadow" version "5.2.0"
|
2018-12-18 20:13:05 +01:00
|
|
|
}
|
|
|
|
|
2019-08-05 09:24:50 +02:00
|
|
|
apply plugin: 'nebula-aggregate-javadocs'
|
|
|
|
|
2019-12-08 10:30:53 +01:00
|
|
|
def determineBuildVersion = {
|
|
|
|
def buildInfo = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'rev-list', '--count', 'HEAD'
|
|
|
|
standardOutput = buildInfo
|
|
|
|
}
|
|
|
|
// Magic number: git rev-list --count cdb13e3b663b18e3938ad5efc60d165fa9301f6e
|
|
|
|
return Integer.parseInt(buildInfo.toString().replaceAll("[^0-9]", "")) - 3529
|
|
|
|
}
|
|
|
|
def buildVersion = determineBuildVersion()
|
|
|
|
|
2018-12-18 20:13:05 +01:00
|
|
|
allprojects {
|
2019-08-08 20:01:48 +02:00
|
|
|
wrapper.gradleVersion = "5.5.1"
|
2018-12-18 20:13:05 +01:00
|
|
|
|
|
|
|
group "com.djrapitops"
|
2019-12-07 19:12:45 +01:00
|
|
|
version "5.0-SNAPSHOT"
|
|
|
|
|
|
|
|
ext.majorVersion = '5'
|
|
|
|
ext.minorVersion = '0'
|
2019-12-08 10:30:53 +01:00
|
|
|
ext.buildVersion = buildVersion
|
|
|
|
ext.fullVersion = project.ext.majorVersion + '.' + project.ext.minorVersion + ' build ' + project.ext.buildVersion
|
2018-12-26 20:44:59 +01:00
|
|
|
|
|
|
|
test {
|
2019-04-03 21:44:26 +02:00
|
|
|
useJUnitPlatform()
|
2018-12-26 20:44:59 +01:00
|
|
|
testLogging {
|
|
|
|
events "passed", "failed"
|
|
|
|
exceptionFormat "full"
|
|
|
|
}
|
|
|
|
}
|
2019-01-12 12:00:30 +01:00
|
|
|
|
|
|
|
// Fix for UTF-8 files showing with wrong encoding when compiled on Windows machines.
|
2020-01-24 11:22:41 +01:00
|
|
|
compileJava { options.encoding = "UTF-8" }
|
|
|
|
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
|
|
|
|
javadoc { options.encoding = 'UTF-8' }
|
2018-12-18 20:13:05 +01:00
|
|
|
}
|
|
|
|
|
2020-01-13 21:40:04 +01:00
|
|
|
println "Building artifact for version $fullVersion"
|
|
|
|
|
2018-12-18 20:13:05 +01:00
|
|
|
subprojects {
|
2019-01-08 12:25:23 +01:00
|
|
|
// Build plugins
|
2018-12-18 20:13:05 +01:00
|
|
|
apply plugin: "java"
|
2019-02-02 09:42:29 +01:00
|
|
|
apply plugin: "maven-publish"
|
2019-01-08 12:25:23 +01:00
|
|
|
apply plugin: "net.ltgt.apt" // Annotation processing plugin
|
|
|
|
apply plugin: "net.ltgt.apt-idea" // Annotation processing IntelliJ IDEA configuration plugin
|
2018-12-18 20:13:05 +01:00
|
|
|
apply plugin: "com.github.johnrengelman.shadow"
|
2019-01-08 12:25:23 +01:00
|
|
|
|
|
|
|
// Report plugins
|
2019-01-03 11:52:01 +01:00
|
|
|
apply plugin: "checkstyle"
|
2018-12-19 18:24:33 +01:00
|
|
|
apply plugin: "jacoco"
|
2018-12-18 20:13:05 +01:00
|
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
|
2020-01-30 06:29:53 +01:00
|
|
|
ext.daggerVersion = "2.26"
|
2020-01-30 06:21:22 +01:00
|
|
|
ext.daggerCompilerVersion = "2.26"
|
2018-12-18 20:13:05 +01:00
|
|
|
|
2019-08-08 10:42:33 +02:00
|
|
|
ext.abstractPluginFrameworkVersion = "3.4.2"
|
2019-01-08 12:25:23 +01:00
|
|
|
|
2019-08-09 08:42:33 +02:00
|
|
|
ext.bukkitVersion = "1.13.2-R0.1-SNAPSHOT"
|
|
|
|
ext.spigotVersion = "1.13.2-R0.1-SNAPSHOT"
|
|
|
|
ext.paperVersion = "1.13.2-R0.1-SNAPSHOT"
|
2018-12-18 20:13:05 +01:00
|
|
|
ext.spongeVersion = "7.1.0"
|
2019-12-08 09:26:24 +01:00
|
|
|
ext.nukkitVersion = "1.0-SNAPSHOT"
|
2019-08-09 08:42:33 +02:00
|
|
|
ext.bungeeVersion = "1.13-SNAPSHOT"
|
2018-12-18 20:13:05 +01:00
|
|
|
ext.velocityVersion = "1.0-SNAPSHOT"
|
|
|
|
ext.redisBungeeVersion = "0.3.8-SNAPSHOT"
|
2019-01-08 12:25:23 +01:00
|
|
|
|
2020-03-09 06:45:03 +01:00
|
|
|
ext.httpClientVersion = "4.5.12"
|
2019-09-03 07:19:11 +02:00
|
|
|
ext.commonsTextVersion = "1.8"
|
2020-02-10 06:30:28 +01:00
|
|
|
ext.commonsCompressVersion = "1.20"
|
2018-12-18 20:13:05 +01:00
|
|
|
ext.htmlCompressorVersion = "1.5.2"
|
2019-08-07 07:34:39 +02:00
|
|
|
ext.caffeineVersion = "2.8.0"
|
2019-04-30 10:07:52 +02:00
|
|
|
ext.h2Version = "1.4.199"
|
2020-01-17 20:29:07 +01:00
|
|
|
ext.mysqlVersion = "8.0.19"
|
2020-01-12 16:05:50 +01:00
|
|
|
ext.hikariVersion = "3.4.2"
|
2019-12-17 08:07:01 +01:00
|
|
|
ext.slf4jVersion = "1.7.30"
|
2020-03-04 06:23:05 +01:00
|
|
|
ext.geoIpVersion = "2.13.1"
|
2019-10-07 07:54:18 +02:00
|
|
|
ext.gsonVersion = "2.8.6"
|
2019-06-12 10:03:54 +02:00
|
|
|
ext.guavaVersion = "28.0-jre"
|
2019-04-30 18:12:41 +02:00
|
|
|
ext.bstatsVersion = "1.4"
|
2019-09-29 12:00:55 +02:00
|
|
|
ext.placeholderapiVersion = "2.9.2"
|
2018-12-18 20:13:05 +01:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2018-12-18 22:06:47 +01:00
|
|
|
maven { // Spigot Repository
|
2018-12-18 20:13:05 +01:00
|
|
|
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
|
|
|
}
|
2018-12-18 22:06:47 +01:00
|
|
|
maven { // Paper Repository
|
2018-12-18 20:13:05 +01:00
|
|
|
url = "https://papermc.io/repo/repository/maven-public/"
|
|
|
|
}
|
2018-12-18 22:06:47 +01:00
|
|
|
maven { // Sponge Repository
|
2018-12-18 20:13:05 +01:00
|
|
|
url = "https://repo.spongepowered.org/maven"
|
|
|
|
}
|
2018-12-18 22:06:47 +01:00
|
|
|
maven { // BungeeCord Repository
|
2018-12-18 20:13:05 +01:00
|
|
|
url = "https://oss.sonatype.org/content/repositories/snapshots"
|
|
|
|
}
|
2018-12-18 22:06:47 +01:00
|
|
|
maven { // RedisBungee Repository
|
2020-01-10 11:29:55 +01:00
|
|
|
url = "https://repo.md-5.net/content/repositories/snapshots/"
|
2018-12-18 20:13:05 +01:00
|
|
|
}
|
2018-12-18 22:06:47 +01:00
|
|
|
maven { // Velocity Repository
|
2018-12-18 20:13:05 +01:00
|
|
|
url = "https://repo.velocitypowered.com/snapshots/"
|
|
|
|
}
|
2019-12-08 10:30:53 +01:00
|
|
|
maven { // Nukkit Repository
|
2020-01-10 11:29:55 +01:00
|
|
|
url = "https://repo.nukkitx.com/main"
|
2019-12-08 10:30:53 +01:00
|
|
|
}
|
2018-12-18 22:06:47 +01:00
|
|
|
maven { // bStats Repository
|
2019-04-30 18:12:41 +02:00
|
|
|
url = "https://repo.codemc.org/repository/maven-public"
|
2018-12-18 20:13:05 +01:00
|
|
|
}
|
2019-08-28 17:32:44 +02:00
|
|
|
maven { // Plan Repository
|
2018-12-18 20:13:05 +01:00
|
|
|
url = "https://dl.bintray.com/rsl1122/Plan-repository"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2019-01-08 12:25:23 +01:00
|
|
|
// Dependency Injection used across the project
|
2018-12-18 20:13:05 +01:00
|
|
|
compile "com.google.dagger:dagger:$daggerVersion"
|
2018-12-18 22:06:47 +01:00
|
|
|
annotationProcessor "com.google.dagger:dagger-compiler:$daggerCompilerVersion"
|
|
|
|
testAnnotationProcessor "com.google.dagger:dagger-compiler:$daggerCompilerVersion"
|
2018-12-18 20:13:05 +01:00
|
|
|
|
2018-12-18 22:06:47 +01:00
|
|
|
// Test Tooling Dependencies
|
2020-01-21 06:21:25 +01:00
|
|
|
testCompile "org.junit.jupiter:junit-jupiter-engine:5.6.0" // JUnit 5
|
2020-01-21 06:29:44 +01:00
|
|
|
testCompile "org.junit.platform:junit-platform-runner:1.6.0" // JUnit 4 runner for JUnit 5 tests
|
2020-01-21 06:37:19 +01:00
|
|
|
testCompile "org.junit.jupiter:junit-jupiter-params:5.6.0" // JUnit 5, parameterized tests
|
2020-02-24 06:38:51 +01:00
|
|
|
testCompile "org.mockito:mockito-core:3.3.0" // Mockito Core
|
2020-02-24 06:29:31 +01:00
|
|
|
testCompile "org.mockito:mockito-junit-jupiter:3.3.0" // Mockito JUnit 5 Extension
|
2019-01-08 12:25:23 +01:00
|
|
|
testCompile "org.seleniumhq.selenium:selenium-java:3.141.59" // Selenium (Browser tests)
|
|
|
|
testCompile "com.jayway.awaitility:awaitility:1.7.0" // Awaitility (Concurrent wait conditions)
|
|
|
|
|
|
|
|
// Testing dependencies required by Plan
|
2019-12-24 06:19:32 +01:00
|
|
|
testCompile "org.xerial:sqlite-jdbc:3.30.1" // SQLite
|
2019-07-08 11:16:06 +02:00
|
|
|
testCompile "mysql:mysql-connector-java:$mysqlVersion" // MySQL
|
2018-12-18 22:06:47 +01:00
|
|
|
}
|
2019-08-08 20:01:48 +02:00
|
|
|
|
2018-12-18 22:06:47 +01:00
|
|
|
configurations {
|
|
|
|
testArtifacts.extendsFrom testRuntime
|
|
|
|
}
|
2018-12-19 18:08:07 +01:00
|
|
|
// Test classes available to other modules
|
2018-12-18 22:06:47 +01:00
|
|
|
task testJar(type: Jar) {
|
|
|
|
classifier "test"
|
|
|
|
from sourceSets.test.output
|
|
|
|
}
|
|
|
|
artifacts {
|
|
|
|
testArtifacts testJar
|
2018-12-18 20:13:05 +01:00
|
|
|
}
|
2019-01-04 16:44:59 +01:00
|
|
|
|
|
|
|
checkstyle {
|
2020-03-10 09:32:38 +01:00
|
|
|
configDir = file("$rootProject.projectDir/config/checkstyle")
|
2019-01-04 16:44:59 +01:00
|
|
|
}
|
2019-08-08 20:01:48 +02:00
|
|
|
|
|
|
|
jacocoTestReport {
|
|
|
|
reports {
|
|
|
|
xml.enabled true
|
2019-12-17 09:00:38 +01:00
|
|
|
// xml.destination file("${buildDir}/jacoco/report.xml")
|
2019-08-08 20:01:48 +02:00
|
|
|
}
|
|
|
|
}
|
2018-12-19 18:24:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
sonarqube {
|
|
|
|
properties {
|
2018-12-19 18:29:43 +01:00
|
|
|
property "sonar.projectName", "Player Analytics"
|
|
|
|
property "sonar.projectKey", "com.djrapitops:Plan"
|
2018-12-19 18:24:33 +01:00
|
|
|
}
|
2020-01-10 11:29:55 +01:00
|
|
|
}
|