⚡ Switch to gradle
This commit is contained in:
parent
05dcd52659
commit
4ca47777a3
45 changed files with 752 additions and 2056 deletions
130
build.gradle
Normal file
130
build.gradle
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.github.jengelman.gradle.plugins:shadow:5.0.0")
|
||||
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'checkstyle'
|
||||
id 'com.github.hierynomus.license' version '0.15.0'
|
||||
id 'java-library'
|
||||
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
configFile file("config/checkstyle/checkstyle.xml")
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: 'com.github.hierynomus.license'
|
||||
apply plugin: 'com.bmuschko.nexus'
|
||||
|
||||
group = 'cloud.commandframework'
|
||||
version = '0.3.0-SNAPSHOT'
|
||||
|
||||
/* Disable checkstyle on tests */
|
||||
project.gradle.startParameter.excludedTaskNames.add('checkstyleTest')
|
||||
|
||||
license {
|
||||
header rootProject.file('HEADER')
|
||||
mapping 'java', 'DOUBLESLASH_STYLE'
|
||||
includes(["**/*.java"])
|
||||
}
|
||||
|
||||
nexus {
|
||||
sign = false
|
||||
repositoryUrl = 'https://mvn.intellectualsites.com/content/repositories/releases/'
|
||||
snapshotRepositoryUrl = 'https://mvn.intellectualsites.com/content/repositories/snapshots/'
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven {
|
||||
url = 'https://repo1.maven.org/maven2'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://repo.viaversion.com/'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://repo.velocitypowered.com/snapshots/'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://libraries.minecraft.net/'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://repo.spongepowered.org/maven'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://papermc.io/repo/repository/maven-public/'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://libraries.minecraft.net'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://repo.nukkitx.com/maven-snapshots'
|
||||
}
|
||||
|
||||
maven {
|
||||
url = 'https://jitpack.io'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api 'com.google.code.findbugs:jsr305:3.0.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
|
||||
}
|
||||
|
||||
sourceCompatibility = '1.8'
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
}
|
||||
|
||||
task aggregatedJavadocs(type: Javadoc, description: "Generate javadocs from all child projects as if it was a single project", group: "Documentation") {
|
||||
destinationDir = file("./docs/javadoc")
|
||||
title = "$project.name $version API"
|
||||
options.author true
|
||||
options.links "http://docs.spring.io/spring/docs/4.3.x/javadoc-api/", "http://docs.oracle.com/javase/8/docs/api/", "http://docs.spring.io/spring-ws/docs/2.3.0.RELEASE/api/", "http://docs.spring.io/spring-security/site/docs/4.0.4.RELEASE/apidocs/"
|
||||
options.addStringOption("Xdoclint:none", "-quiet")
|
||||
|
||||
delete("./docs")
|
||||
|
||||
subprojects.each { proj ->
|
||||
proj.tasks.withType(Javadoc).each { javadocTask ->
|
||||
source += javadocTask.source
|
||||
classpath += javadocTask.classpath
|
||||
excludes += javadocTask.excludes
|
||||
includes += javadocTask.includes
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue