Skip to content

Commit 1e2f77a

Browse files
author
Jan Phillip Kretzschmar
committed
feat: configure maven publishing
1 parent 29bbf73 commit 1e2f77a

File tree

1 file changed

+47
-3
lines changed

1 file changed

+47
-3
lines changed

build.gradle.kts

+47-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33

44
plugins {
5+
`java-library`
56
kotlin("jvm") version "1.7.10"
67
id("org.jlleitschuh.gradle.ktlint") version "10.3.0"
8+
`maven-publish`
9+
signing
710
}
811

9-
group = "com.valtechmobility.gradle.credentials.onepassword"
10-
1112
java {
1213
sourceCompatibility = JavaVersion.VERSION_11
1314
targetCompatibility = JavaVersion.VERSION_11
@@ -27,9 +28,52 @@ tasks.withType<Test> {
2728

2829
dependencies {
2930
implementation(gradleApi())
30-
implementation(localGroovy())
3131

3232
testImplementation("junit:junit:4.13.2")
3333
testImplementation(gradleTestKit())
3434
testImplementation("io.mockk:mockk:1.12.3")
3535
}
36+
37+
group = "com.valtechmobility"
38+
version = "0.0.1"
39+
40+
publishing {
41+
publications {
42+
register("mavenJava", MavenPublication::class) {
43+
artifactId = "gradle-credentials-onepassword"
44+
from(components["java"])
45+
versionMapping {
46+
usage("java-api") {
47+
fromResolutionOf("runtimeClasspath")
48+
}
49+
usage("java-runtime") {
50+
fromResolutionResult()
51+
}
52+
}
53+
pom {
54+
name.set("gradle-credentials-onepassword")
55+
description.set("gradle-credentials-onepassword is a gradle repository credential integration for 1Password")
56+
url.set("https://github.com/ValtechMobility/gradle-onepassword-credentials-plugin")
57+
58+
licenses {
59+
license {
60+
name.set("MIT License")
61+
url.set("http://opensource.org/licenses/MIT")
62+
}
63+
}
64+
developers {
65+
developer {
66+
id.set("janphkre")
67+
name.set("Jan Phillip Kretzschmar")
68+
email.set("[email protected]")
69+
}
70+
}
71+
scm {
72+
connection.set("scm:git://github.com/ValtechMobility/gradle-onepassword-credentials-plugin.git")
73+
developerConnection.set("scm:git://github.com/ValtechMobility/gradle-onepassword-credentials-plugin.git")
74+
url.set("https://github.com/ValtechMobility/gradle-onepassword-credentials-plugin")
75+
}
76+
}
77+
}
78+
}
79+
}

0 commit comments

Comments
 (0)