-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
89 lines (78 loc) · 2.25 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
apply plugin: 'groovy'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'java-gradle-plugin'
group = 'net.satago.gradle'
version = file('./src/main/bundle/version').text
repositories {
mavenCentral()
}
dependencies {
implementation gradleApi()
implementation localGroovy()
testImplementation 'junit:junit:4.12'
testImplementation gradleTestKit()
testImplementation 'commons-io:commons-io:2.4'
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'aws-candy-tools'
pom {
name = 'AWS Candy Tools'
description = 'AWS Candy Tools'
url = 'https://github.com/satago/aws-candy-tools'
scm {
connection = '[email protected]:satago/aws-candy-tools.git'
developerConnection = '[email protected]:satago/aws-candy-tools.git'
url = 'https://github.com/satago/aws-candy-tools'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
}
}
repositories {
maven {
url = nexusRepositoryUrl
credentials {
username = nexusUsername
password = nexusPassword
}
}
}
}
task tarBundle(type: Tar) {
archiveFileName = 'bundle.tgz'
destinationDirectory = file('build/tar')
from('./src/main/bundle') {
exclude 'build/tar/'
}
compression Compression.GZIP
}
jar {
manifest {
attributes 'Implementation-Title': 'aws-candy-tools',
'Implementation-Version': project.version
}
with copySpec() {
from tarBundle.outputs
into 'META-INF/aws-candy-tools'
}
}
pluginUnderTestMetadata.dependsOn jar
pluginUnderTestMetadata {
// Run tests with final JAR file instead of extracted classes/resources
pluginClasspath.from(
files(jar.archiveFile),
sourceSets.main.output.classesDirs,
sourceSets.main.output.resourcesDir)
}