Plan/Plan/build.gradle

170 lines
5.3 KiB
Groovy
Raw Normal View History

// Aggregate Javadocs
buildscript {
repositories { mavenCentral() }
dependencies {
classpath 'com.netflix.nebula:gradle-aggregate-javadocs-plugin:3.0.+'
}
}
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2" apply false
id "java"
2018-12-19 18:24:33 +01:00
id "jacoco"
id "checkstyle"
id "org.sonarqube" version "3.4.0.2513"
id 'fabric-loom' version '0.12.+' apply false
}
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()
allprojects {
group "com.djrapitops"
version "5.4-SNAPSHOT"
ext.majorVersion = '5'
ext.minorVersion = '4'
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
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' }
}
logger.lifecycle("Building artifact for version $fullVersion")
subprojects {
// Build plugins
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "java"
2019-02-02 09:42:29 +01:00
apply plugin: "maven-publish"
// Report plugins
apply plugin: "checkstyle"
2018-12-19 18:24:33 +01:00
apply plugin: "jacoco"
compileJava {
options.release = 8
}
ext {
daggerVersion = "2.42"
palVersion = "5.0.3"
bukkitVersion = "1.13.2-R0.1-SNAPSHOT"
spigotVersion = "1.13.2-R0.1-SNAPSHOT"
paperVersion = "1.13.2-R0.1-SNAPSHOT"
spongeVersion = "7.4.0"
nukkitVersion = "1.0-SNAPSHOT"
bungeeVersion = "1.16-R0.4"
velocityVersion = "3.0.0-SNAPSHOT"
redisBungeeVersion = "0.3.8-SNAPSHOT"
commonsTextVersion = "1.9"
commonsCompressVersion = "1.21"
caffeineVersion = "2.9.2"
mysqlVersion = "8.0.29"
sqliteVersion = "3.36.0.3"
hikariVersion = "4.0.3"
slf4jVersion = "1.7.36"
geoIpVersion = "2.16.1"
gsonVersion = "2.9.0"
dependencyDownloadVersion = "1.2.1"
bstatsVersion = "2.2.1"
placeholderapiVersion = "2.11.1"
nkPlaceholderapiVersion = "1.4-SNAPSHOT"
junitVersion = "5.8.2"
mockitoVersion = "4.6.1"
Bump testContainersVersion from 1.17.1 to 1.17.2 in /Plan (#2371) Bumps `testContainersVersion` from 1.17.1 to 1.17.2. Updates `testcontainers` from 1.17.1 to 1.17.2 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.17.1...1.17.2) Updates `junit-jupiter` from 1.17.1 to 1.17.2 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.17.1...1.17.2) Updates `nginx` from 1.17.1 to 1.17.2 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.17.1...1.17.2) --- updated-dependencies: - dependency-name: org.testcontainers:testcontainers dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.testcontainers:nginx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-20 15:30:45 +02:00
testContainersVersion = "1.17.2"
}
repositories {
mavenCentral()
google()
maven { url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" } // Spigot
maven { url = "https://papermc.io/repo/repository/maven-public/" } // Paper
maven { url = "https://repo.spongepowered.org/repository/maven-public/" } // Sponge
maven { url = "https://oss.sonatype.org/content/repositories/snapshots" } // BungeeCord
maven { url = "https://repo.md-5.net/content/repositories/snapshots/" } // RedisBungee
maven { url = "https://repo.velocitypowered.com/snapshots/" } // Velocity
maven { url = "https://repo.playeranalytics.net/releases" } // Plan
}
dependencies {
// Dependency Injection used across the project
implementation "com.google.dagger:dagger:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
testAnnotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
// Test Tooling Dependencies
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion" // JUnit 5
testImplementation "org.mockito:mockito-core:$mockitoVersion" // Mockito Core
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion" // Mockito JUnit 5 Extension
testImplementation "com.jayway.awaitility:awaitility:1.7.0" // Awaitility (Concurrent wait conditions)
// Testing dependencies required by Plan
testImplementation "org.xerial:sqlite-jdbc:$sqliteVersion" // SQLite
testImplementation "mysql:mysql-connector-java:$mysqlVersion" // MySQL
}
2019-08-08 20:01:48 +02:00
configurations {
testArtifacts.extendsFrom testRuntimeOnly
}
// Test classes available to other modules
task testJar(type: Jar) {
archiveClassifier.set("test")
from sourceSets.test.output
}
artifacts {
testArtifacts testJar
}
2020-03-10 21:56:44 +01:00
test {
useJUnitPlatform()
testLogging {
events "passed", "failed", "skipped"
exceptionFormat "full"
}
}
checkstyle {
toolVersion "8.44"
2020-03-10 21:56:44 +01:00
getConfigDirectory().set file("$rootProject.projectDir/config/checkstyle")
}
2019-08-08 20:01:48 +02:00
jacocoTestReport {
reports {
xml.required = true
// xml.destination file("${buildDir}/jacoco/report.xml")
2019-08-08 20:01:48 +02:00
}
}
plugins.withType(JacocoPlugin) {
tasks["test"].finalizedBy 'jacocoTestReport'
}
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"
2022-05-28 08:57:37 +02:00
property "sonar.coverage.jacoco.xmlReportPaths", "build/report/jacoco/test/jacocoTestReport.xml"
2018-12-19 18:24:33 +01:00
}
}