-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathbuild.gradle
More file actions
113 lines (100 loc) 路 2.77 KB
/
Copy pathbuild.gradle
File metadata and controls
113 lines (100 loc) 路 2.77 KB
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
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '2.3.21'
id 'org.jetbrains.dokka' version '1.9.20'
id 'io.gitlab.arturbosch.detekt' version '1.23.8'
id 'maven-publish'
}
repositories {
mavenCentral()
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.dokka'
repositories {
mavenCentral()
}
version = '1.2.4'
java {
targetCompatibility = '11'
sourceCompatibility = '11'
}
jar {
manifest {
attributes provider: 'gradle',
'Implementation-Title': project.name, 'Implementation-Version': archiveVersion,
'Implementation-Vendor': project.group, 'Implementation-Vendor-Id': project.group,
'Specification-Vendor': project.group,
'Specification-Title': project.name,
'Specification-Version': archiveVersion,
'Automatic-Module-Name': project.group + "." + project.name.replaceAll('-', '_')
}
}
tasks.register('javadocJar', Jar) {
dependsOn = [javadoc, dokkaJavadoc]
archiveClassifier = 'javadoc'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from javadoc.destinationDir, dokkaJavadoc.outputDirectory
}
tasks.register('sourceJar', Jar) {
archiveClassifier = 'sources'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.main.allSource
}
compileKotlin {
kotlinOptions.jvmTarget = '11'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '11'
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenPublication(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
pom {
name = project.name
description = 'Pact Plugin Driver implementation'
url = 'https://github.com/pact-foundation/pact-plugins'
licenses {
license {
name = 'MIT'
url = 'https://github.com/pact-foundation/pact-plugins/blob/main/LICENSE'
distribution = 'repo'
}
}
scm {
url = 'https://github.com/pact-foundation/pact-plugins'
connection = 'git://github.com/pact-foundation/pact-plugins.git'
}
developers {
developer {
id = 'mfellows'
name = 'Matt Fellows'
email = 'mfellows@dius.com.au'
}
developer {
id = 'rholshausen'
name = 'Ronald Holshausen'
email = 'ronald.holshausen@smartbear.com'
}
}
}
}
}
repositories {
maven {
url = layout.buildDirectory.dir('staging-deploy')
}
}
}
detekt {
config.setFrom(rootProject.file("config/detekt-config.yml"))
}
}