-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigurator.gradle
152 lines (134 loc) · 4.54 KB
/
configurator.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
repositories {
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'ru.yoomoney.gradle.plugins.java-artifact-publish-plugin'
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'java-gradle-plugin'
apply plugin: 'ru.yoomoney.gradle.plugins.artifact-release-plugin'
releaseSettings {
releaseTasks = ["build", "publish", "closeAndReleaseMavenStagingRepository", "publishPlugins"]
pathToGitPrivateSshKey = System.getenv("GIT_PRIVATE_SSH_KEY_PATH")
passphraseToGitPrivateSshKey = System.getenv("GIT_KEY_PASSPHRASE")
gitUsername = "yoomoney-robot"
gitEmail = "[email protected]"
changelogRequired = true
addPullRequestLinkToChangelog = true
pullRequestInfoProvider = "GitHub"
githubAccessToken = System.getenv("GITHUB_TOKEN")
}
javaArtifactPublishSettings {
nexusUser = System.getenv("NEXUS_USER")
nexusPassword = System.getenv("NEXUS_PASSWORD")
artifactId = 'gradle-project-plugin'
groupId = 'ru.yoomoney.gradle.plugins'
snapshotRepository = "https://oss.sonatype.org/content/repositories/snapshots/"
signing = true
staging {
enabled = true
nexusUrl = "https://oss.sonatype.org/service/local/"
}
publicationAdditionalInfo {
addInfo = true
organizationUrl = "https://github.com/yoomoney"
license {
name = "MIT License"
url = "http://www.opensource.org/licenses/mit-license.php"
}
developers {
developer {
name = 'Oleg Kandaurov'
email = '[email protected]'
organization = 'YooMoney'
organizationUrl = 'https://yoomoney.ru'
}
}
description = "Gradle project plugin"
}
}
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
compileJava {
options.compilerArgs.addAll(['--release', '8'])
}
jar {
manifest {
attributes(
'Implementation-Version': "$project.version",
'Implementation-Title': "$project.name",
'Built-By': java.lang.System.getProperty('user.name'),
'Built-Date': new Date().format('yyyy-MM-dd'),
'Copyright': '2021 NBCO YooMoney LLC',
'License': 'MIT'
)
}
from(projectDir.absolutePath) {
include "CHANGELOG.md", "README.md"
into "META-INF"
}
}
apply plugin: 'idea'
idea {
project {
jdkName = '1.8'
languageLevel = '1.8'
vcs = 'Git'
}
module {
downloadJavadoc = true
downloadSources = true
}
}
test {
systemProperty "file.encoding", "UTF-8"
testLogging {
events "skipped", "failed"
exceptionFormat "full"
showExceptions true
showCauses true
showStackTraces true
}
}
apply plugin: "jacoco"
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
}
}
check.dependsOn jacocoTestReport
// создаем таску checkCoverage. В этом плагине она ничего не проверяет, но нужна для поддержки общего скрипта сборки
// для yoomoney. см. yoomoney/travis-shared-configuration:build-and-publish-plugin.yml
task checkCoverage {
dependsOn jacocoTestReport
}
// создаем таску checkSnapshotsDependencies. В этом плагине она ничего не проверяет, но нужна для поддержки общего скрипта сборки
// для yoomoney. см. yoomoney/travis-shared-configuration:build-and-publish-plugin.yml
task checkSnapshotsDependencies {
dependsOn jacocoTestReport
}
group = 'ru.yoomoney.gradle.plugins'
gradlePlugin {
plugins {
gradleProjectPlugin {
id = 'ru.yoomoney.gradle.plugins.gradle-project-plugin'
implementationClass = 'ru.yoomoney.gradle.plugins.gradleproject.GradleProjectPlugin'
displayName = 'Gradle Project Plugin'
}
}
}
pluginBundle {
website = 'https://github.com/yoomoney/gradle-project-plugin'
vcsUrl = 'https://github.com/yoomoney/gradle-project-plugin.git'
description = 'Gradle project plugin'
tags = ['gradle', 'plugin', 'yoomoney']
mavenCoordinates {
groupId = "ru.yoomoney.gradle.plugins"
artifactId = "gradle-project-plugin"
}
}
project.getExtensions().getByType(GradlePluginDevelopmentExtension.class).setAutomatedPublishing(false)