2021-08-20 19:16:39 +02:00
|
|
|
plugins {
|
|
|
|
id 'org.cadixdev.licenser' version '0.6.1' apply false
|
2018-09-24 14:52:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
defaultTasks 'licenseFormat', 'build'
|
|
|
|
|
2018-08-10 21:39:29 +02:00
|
|
|
subprojects {
|
|
|
|
apply plugin: 'java'
|
2021-08-20 19:16:39 +02:00
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
apply plugin: 'org.cadixdev.licenser'
|
2018-08-10 21:39:29 +02:00
|
|
|
|
|
|
|
group = 'me.lucko.luckperms'
|
2022-02-09 22:39:45 +01:00
|
|
|
version = '5.4-SNAPSHOT'
|
2018-08-10 21:39:29 +02:00
|
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
}
|
|
|
|
|
2018-08-14 11:56:07 +02:00
|
|
|
jar {
|
|
|
|
from '../LICENSE.txt'
|
|
|
|
}
|
|
|
|
|
2018-08-10 21:39:29 +02:00
|
|
|
def determinePatchVersion = {
|
|
|
|
// get the name of the last tag
|
2018-09-23 16:20:22 +02:00
|
|
|
def tagInfo = new ByteArrayOutputStream()
|
2018-08-10 21:39:29 +02:00
|
|
|
exec {
|
2018-09-23 16:20:22 +02:00
|
|
|
commandLine 'git', 'describe', '--tags'
|
|
|
|
standardOutput = tagInfo
|
2018-08-10 21:39:29 +02:00
|
|
|
}
|
2018-09-23 16:20:22 +02:00
|
|
|
tagInfo = tagInfo.toString()
|
2018-08-10 21:39:29 +02:00
|
|
|
|
2018-09-23 16:20:22 +02:00
|
|
|
if (!tagInfo.contains('-')) {
|
|
|
|
return 0
|
2018-08-10 21:39:29 +02:00
|
|
|
}
|
2018-09-23 16:20:22 +02:00
|
|
|
return tagInfo.split("-")[1]
|
2018-08-10 21:39:29 +02:00
|
|
|
}
|
|
|
|
|
2019-08-11 23:42:01 +02:00
|
|
|
project.ext.majorVersion = '5'
|
2022-02-09 22:39:45 +01:00
|
|
|
project.ext.minorVersion = '4'
|
2018-08-10 21:39:29 +02:00
|
|
|
project.ext.patchVersion = determinePatchVersion()
|
2019-11-18 22:19:59 +01:00
|
|
|
project.ext.apiVersion = project.ext.majorVersion + '.' + project.ext.minorVersion
|
|
|
|
project.ext.fullVersion = project.ext.apiVersion + '.' + project.ext.patchVersion
|
2018-08-10 21:39:29 +02:00
|
|
|
|
2018-09-24 14:52:59 +02:00
|
|
|
license {
|
2018-11-10 21:20:58 +01:00
|
|
|
header = rootProject.file('HEADER.txt')
|
2018-09-24 14:52:59 +02:00
|
|
|
include '**/*.java'
|
|
|
|
newLine = true
|
|
|
|
}
|
|
|
|
|
2018-08-10 21:39:29 +02:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-07-20 23:46:22 +02:00
|
|
|
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
|
|
|
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
2019-01-07 22:25:11 +01:00
|
|
|
maven { url 'https://repo.lucko.me/' }
|
2022-05-20 21:09:04 +02:00
|
|
|
maven { url 'https://libraries.minecraft.net/' }
|
2018-08-10 21:39:29 +02:00
|
|
|
}
|
|
|
|
}
|