-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
119 lines (106 loc) · 3.47 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`java-library`
kotlin("jvm") version "1.9.22"
id("org.jlleitschuh.gradle.ktlint") version "12.1.0"
`maven-publish`
`signing`
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
kotlinOptions.freeCompilerArgs += "-Xexplicit-api=strict"
}
tasks.withType<Test> {
testLogging {
showStandardStreams = true
events("skipped", "failed")
}
}
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
version.set("1.1.1")
debug.set(false)
verbose.set(false)
android.set(true)
outputToConsole.set(true)
outputColorName.set("RED")
ignoreFailures.set(false)
baseline.set(file("ktlint-baseline.xml"))
filter {
exclude {
projectDir.toURI().relativize(it.file.toURI()).path.startsWith("build/")
}
}
}
dependencies {
implementation(gradleApi())
testImplementation("junit:junit:4.13.2")
testImplementation(gradleTestKit())
testImplementation("io.mockk:mockk:1.13.9")
}
java {
withJavadocJar()
withSourcesJar()
}
group = "io.github.valtechmobility"
version = "0.1.0"
publishing {
publications {
register("mavenJava", MavenPublication::class) {
artifactId = "gradle-credentials-onepassword"
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("gradle-credentials-onepassword")
description.set(
"gradle-credentials-onepassword is a gradle repository credential integration for 1Password",
)
url.set("https://github.com/ValtechMobility/gradle-onepassword-credentials-plugin")
licenses {
license {
name.set("MIT License")
url.set("http://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("vm")
name.set("Valtech Mobility")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git://github.com/ValtechMobility/gradle-onepassword-credentials-plugin.git")
developerConnection.set(
"scm:git://github.com/ValtechMobility/gradle-onepassword-credentials-plugin.git",
)
url.set("https://github.com/ValtechMobility/gradle-onepassword-credentials-plugin")
}
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("MAVEN_USERNAME"))
password.set(System.getenv("MAVEN_PASSWORD"))
}
}
}