-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathbuild.gradle
98 lines (77 loc) · 2.64 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import java.nio.file.Files
import java.nio.file.Paths
import java.nio.file.StandardCopyOption
import java.nio.file.StandardOpenOption
buildscript {
repositories {
maven {url "https://plugins.gradle.org/m2/"}
mavenCentral()
}
dependencies {
classpath "org.apache.httpcomponents:httpmime:4.5.13"
classpath "com.google.code.gson:gson:2.8.6"
classpath "org.apache.httpcomponents:httpclient:4.5.13"
}
}
plugins {
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
}
apply from: 'env-variables.gradle'
apply from: 'changelog-util.gradle'
allprojects {
apply plugin: 'java'
apply plugin: 'idea'
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
if (project.name != "Advanced-Portals") {
task buildSubmodules doLast {
task -> println "Building $task.project.name"
}
buildSubmodules.finalizedBy build
}
tasks.processResources {
def files = ["plugin.yml", "bungee.yml"]
filesMatching(files) {
expand(["pluginVersion": project.version])
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
ext.branch = rootProject.ext.branch
ext.snapshotName = rootProject.ext.snapshotName
ext.githubSha = rootProject.ext.githubSha
ext.shaRef = rootProject.ext.shaRef
ext.isRelease = rootProject.ext.isRelease
def versionString = (rootProject.file('./version.txt').text + (isRelease ? "" : "-${snapshotName}${shaRef}")).replaceAll('\n', '').replaceAll('\r', '')
setVersion(versionString)
}
println("Branch ${ext.branch}${ext.shaRef} isRelease: '${ext.isRelease}'")
println("Snapshot Name: ${ext.snapshotName}")
println("Github SHA: ${ext.githubSha}")
println("Sha Ref: ${ext.shaRef}")
group = 'com.sekwah.advancedportals'
println "Version: ${getVersion()}"
description = ""
configurations {
// configuration that holds jars to copy into lib
implementation.extendsFrom(includeLibs)
}
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://nexus.velocitypowered.com/repository/maven-public/" }
}
// Needed to find generateTemplates task
evaluationDependsOn(':core')
println "Branch ${ext.branch}${ext.shaRef} isRelease: '${ext.isRelease}'"
idea {
project {
settings {
taskTriggers {
afterSync(project(':core').tasks.named('generateTemplates').get())
}
}
}
}