-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
105 lines (89 loc) · 2.65 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
98
99
100
101
102
103
104
105
plugins {
id 'java-gradle-plugin'
id 'maven-publish'
id 'com.gradle.plugin-publish' version '1.2.1'
id 'com.diffplug.spotless' version '6.13.0'
}
group 'net.smoofyuniverse'
version '1.0.7'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
withJavadocJar()
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
gradlePlugin {
plugins {
DependencyExporter {
id = 'net.smoofyuniverse.dependency-exporter'
displayName = 'DependencyExporter'
description = 'Export Gradle dependencies to JSON files.'
implementationClass = 'net.smoofyuniverse.exporter.DependencyExporterPlugin'
}
}
}
pluginBundle {
website = 'https://github.com/Yeregorix/DependencyExporter'
vcsUrl = 'https://github.com/Yeregorix/DependencyExporter.git'
tags = ['dependency', 'export', 'json']
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
}
spotless {
ratchetFrom 'origin/master'
java {
licenseHeaderFile(rootProject.file('HEADER'))
}
}
publishing {
publications.withType(MavenPublication).configureEach {
pom {
name = 'DependencyExporter'
description = 'Export Gradle dependencies to JSON file.'
url = 'https://github.com/Yeregorix/DependencyExporter'
scm {
connection = 'scm:git:https://github.com/Yeregorix/DependencyExporter.git'
developerConnection = 'scm:git:https://github.com/Yeregorix/DependencyExporter.git'
url = 'https://github.com/Yeregorix/DependencyExporter'
}
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'Yeregorix'
name = 'Hugo Dupanloup'
email = '[email protected]'
}
}
}
}
repositories {
maven {
url = version.endsWith('SNAPSHOT') ?
'https://oss.sonatype.org/content/repositories/snapshots/'
: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username findProperty('ossrhUsername')
password findProperty('ossrhPassword')
}
}
}
}
if (project.hasProperty('signing.keyId')) {
apply plugin: 'signing'
signing {
sign publishing.publications
}
}