oblak/build.gradle
2020-10-01 15:41:47 +02:00

176 lines
4.6 KiB
Groovy

buildscript {
repositories {
mavenCentral()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
dependencies {
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'
id 'maven-publish'
}
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'
description = 'Command framework and dispatcher for the JVM'
/* 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'
apply plugin: 'signing'
test {
useJUnitPlatform()
}
task publishingSourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier.set('sources')
}
task publishingJavadocJar(type: Jar) {
from javadoc
archiveClassifier.set('javadoc')
}
repositories {
mavenLocal()
mavenCentral()
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 {
compileOnly 'org.checkerframework:checker-qual:3.5.0'
api 'io.leangen.geantyref:geantyref:0.3.4'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}
sourceCompatibility = '1.8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact publishingJavadocJar
artifact publishingSourcesJar
pom {
name = project.name
url = 'https://github.com/Sauilitired/cloud'
description = project.description
developers {
developer {
id = 'Sauilitired'
name = 'Alexander Söderberg'
url = 'https://alexander-soderberg.com'
email = 'contact@alexander-soderberg.com'
}
}
issueManagement {
system = 'GitHub Issues'
url = 'https://github.com/Sauilitired/cloud/issues'
}
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
scm {
connection = 'scm:git@github.com:Sauilitired/cloud.git'
developerConnection = 'scm:git@github.com:Sauilitired/cloud.git'
url = 'https://github.com/Sauilitired/cloud/'
}
}
}
}
}
signing {
required { project.hasProperty('signing.keyId') && gradle.taskGraph.hasTask(':publish') && !project.version.endsWith('-SNAPSHOT') }
sign publishing.publications.maven
}
}