-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
132 lines (117 loc) · 3.16 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
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
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath libs.junitGradlePlugin
classpath libs.kotlinGradlePlugin
classpath libs.dokkaGradlePlugin
classpath libs.mavenPublishGradlePlugin
classpath libs.spotlessPlugin
classpath libs.graalPlugin
}
}
allprojects {
group = 'app.cash.certifikit'
version = '0.3.0-SNAPSHOT'
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'org.jetbrains.kotlin.multiplatform'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'com.diffplug.spotless'
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += "-Xjvm-default=all"
}
}
spotless {
kotlin {
target "**/*.kt"
ktlint(libs.versions.ktlintVersion.get())
.userData(['indent_size': '2', 'continuation_indent_size': '2'])
}
}
dokka {
configuration {
reportUndocumented = false
skipDeprecated = true
jdkVersion = 8
perPackageOption {
prefix = "app.cash.certifikit.internal"
suppress = true
}
externalDocumentationLink {
url = new URL("https://square.github.io/okio/2.x/okio/")
packageListUrl = new URL("https://square.github.io/okio/2.x/okio/package-list")
}
}
}
}
subprojects { project ->
apply plugin: 'maven-publish'
apply plugin: 'signing'
test {
useJUnitPlatform()
}
publishing {
java {
withJavadocJar()
withSourcesJar()
}
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = project.name
version = project.version
from components.java
pom {
name = project.name
description = 'Kotlin Certificate processing'
url = 'https://cashapp.github.io/certifikit/'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Square, Inc.'
}
}
scm {
connection = 'scm:git:https://github.com/cashapp/certifikit.git'
developerConnection = 'scm:git:ssh://git@github.com/cashapp/certifikit.git'
url = 'https://github.com/cashapp/certifikit'
}
}
}
}
repositories {
maven {
name = "mavencentral"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username System.getenv('SONATYPE_NEXUS_USERNAME')
password System.getenv('SONATYPE_NEXUS_PASSWORD')
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = ""
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}