-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
89 lines (76 loc) · 2.31 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
import org.groovymc.simpleci.SimpleCI
plugins {
id 'java'
id 'maven-publish'
id 'groovy-gradle-plugin'
id 'com.gradle.plugin-publish' version '0.18.0'
}
apply plugin: SimpleCI
repositories {
mavenCentral()
}
versioning {
fromTag = '0.1'
}
group = 'org.groovymc.simpleci'
archivesBaseName = 'simpleci'
println("SimpleCI plugin version: ${version = versioning.calculatedVersion}")
java.toolchain.languageVersion.set(JavaLanguageVersion.of(8))
pluginBundle {
tags = ['versioning', 'git']
website = 'https://github.com/GroovyMC/SimpleCI'
vcsUrl = 'https://github.com/GroovyMC/SimpleCI'
}
gradlePlugin {
plugins {
simpleci {
id = 'org.groovymc.simpleci'
displayName = 'SimpleCI'
description = 'A Gradle Plugin used for simple (Minecraft mod) CI configuration'
implementationClass = 'org.groovymc.simpleci.SimpleCI'
}
}
}
tasks.named('jar', Jar) {
it.manifest.attributes([
'Specification-Title' : archivesBaseName,
'Specification-Vendor' : 'GroovyMC',
'Specification-Version' : '1',
'Implementation-Title' : archivesBaseName,
'Implementation-Version' : "${project.version}",
'Implementation-Vendor' : 'Matyrobbrt',
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})"
])
}
tasks.register('copySources', Copy) {
from('buildSrc/src')
into('src')
}
tasks.named('compileGroovy', GroovyCompile) {
it.dependsOn(tasks.copySources)
it.outputs.upToDateWhen { false }
}
dependencies {
implementation "org.eclipse.jgit:org.eclipse.jgit:${jgit_version}"
}
project.afterEvaluate {
publishing {
publications {
named('pluginMaven').configure {
changelog.addArtifact(it)
}
}
}
}
publishing {
repositories {
maven {
name = 'ModdingInquisitionMavenRepo'
url = 'https://maven.moddinginquisition.org/releases'
credentials {
username = (System.getenv('MAVEN_USER') ?: findProperty('inquisitionMavenUser')) ?: ''
password = (System.getenv('MAVEN_PASSWORD') ?: findProperty('inquisitionMavenPassword')) ?: ''
}
}
}
}