Skip to content

Commit de553fb

Browse files
committed
new plug-in template applied.
1 parent bde4fc6 commit de553fb

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

build.gradle.kts

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ val pluginVersion: String by extra(buildSrc.versions.plugin.version.get())
1212
val pluginName: String by extra(buildSrc.versions.plugin.name.get())
1313
val pluginDesc: String by extra(buildSrc.versions.plugin.desc.get())
1414
val pluginIdentifier: String by extra(buildSrc.versions.plugin.identifier.get())
15+
val githubHandle: String by extra(buildSrc.versions.github.handle.get())
1516
val githubEmail: String by extra(buildSrc.versions.github.email.get())
1617
val githubDev: String by extra(buildSrc.versions.github.dev.get())
17-
val githubHandle: String by extra(buildSrc.versions.github.handle.get())
18-
1918

2019
gradlePlugin {
2120
plugins {
@@ -87,45 +86,46 @@ artifacts {
8786
group = pluginGroup
8887
version = pluginVersion
8988

90-
configure<PublishingExtension> {
91-
92-
repositories {
93-
maven {
94-
name = "GitHubPackages"
95-
url = uri("https://maven.pkg.github.com/${githubHandle}/${pluginIdentifier}")
96-
credentials {
97-
username = System.getenv("GITHUB_ACTOR")
98-
password = System.getenv("GITHUB_TOKEN")
89+
afterEvaluate {
90+
configure<PublishingExtension> {
91+
repositories {
92+
maven {
93+
name = "GitHubPackages"
94+
url = uri("https://maven.pkg.github.com/${githubHandle}/${pluginIdentifier}")
95+
credentials {
96+
username = System.getenv("GITHUB_ACTOR")
97+
password = System.getenv("GITHUB_TOKEN")
98+
}
9999
}
100100
}
101-
}
102101

103-
publications {
104-
register<MavenPublication>("Plugin") {
105-
from(components.getByName("java"))
106-
groupId = pluginGroup
107-
artifactId = pluginIdentifier
108-
version = pluginVersion
109-
pom {
110-
name = pluginName
111-
description = pluginDesc
112-
url = "https://github.com/${githubHandle}/${pluginIdentifier}"
113-
scm {
114-
connection = "scm:git:git://github.com/${githubHandle}/${pluginIdentifier}.git"
115-
developerConnection = "scm:git:ssh://github.com/${githubHandle}/${pluginIdentifier}.git"
116-
url = "https://github.com/${githubHandle}/${pluginIdentifier}/"
117-
}
118-
developers {
119-
developer {
120-
name = githubDev
121-
email = githubEmail
122-
id = githubHandle
102+
publications {
103+
register<MavenPublication>("Plugin") {
104+
from(components.getByName("java"))
105+
groupId = pluginGroup
106+
artifactId = pluginIdentifier
107+
version = pluginVersion
108+
pom {
109+
name = pluginName
110+
description = pluginDesc
111+
url = "https://github.com/${githubHandle}/${pluginIdentifier}"
112+
scm {
113+
connection = "scm:git:git://github.com/${githubHandle}/${pluginIdentifier}.git"
114+
developerConnection = "scm:git:ssh://github.com/${githubHandle}/${pluginIdentifier}.git"
115+
url = "https://github.com/${githubHandle}/${pluginIdentifier}/"
123116
}
124-
}
125-
licenses {
126-
license {
127-
name = "MIT License"
128-
url = "http://www.opensource.org/licenses/mit-license.php"
117+
developers {
118+
developer {
119+
name = githubDev
120+
email = githubEmail
121+
id = githubHandle
122+
}
123+
}
124+
licenses {
125+
license {
126+
name = "MIT License"
127+
url = "http://www.opensource.org/licenses/mit-license.php"
128+
}
129129
}
130130
}
131131
}

0 commit comments

Comments
 (0)