-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
160 lines (132 loc) · 4.55 KB
/
build.gradle
File metadata and controls
160 lines (132 loc) · 4.55 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.6.2/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id 'java'
id 'maven-publish'
id 'signing'
}
sourceCompatibility = 1.8
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
jcenter()
}
dependencies {
// This dependency is used by the application.
implementation('com.google.guava:guava:30.1.1-jre')
//Testvagrant
implementation 'com.testvagrant.ekam:ekam-api:0.0.2-alpha'
implementation('com.testvagrant.ekam:ekam-commons:0.0.5-beta')
// square
implementation('com.squareup.retrofit2:retrofit:2.9.0')
implementation('com.squareup.retrofit2:converter-gson:2.9.0')
implementation('com.squareup.okhttp3:logging-interceptor:4.11.0')
//mongodb
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.12.14'
//lombok
implementation('org.projectlombok:lombok:1.18.28')
annotationProcessor('org.projectlombok:lombok:1.18.28')
testImplementation('org.projectlombok:lombok:1.18.28')
testAnnotationProcessor('org.projectlombok:lombok:1.18.28')
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
// Use TestNG framework, also requires calling test.useTestNG() below
implementation 'org.testng:testng:7.8.0'
}
task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourceJar
archives javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
customizePom(pom)
groupId 'com.testvagrant.ekam'
artifactId 'ekam-report-publisher'
version '0.0.4'
from components.java
artifact(sourceJar) {
classifier = 'sources'
}
artifact(javadocJar) {
classifier = 'javadoc'
}
}
}
repositories {
maven {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
def customizePom(pom) {
pom.withXml {
def root = asNode()
// eliminate test-scoped dependencies (no need in maven central POMs)
root.dependencies.removeAll { dep ->
dep.scope == "test"
}
// add all items necessary for maven central publication
root.children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
description 'Ekam Report publisher for dashboard'
name 'Ekam Report Publisher'
url 'https://gitlab.com/testvagrant/automation-platform/ekam-studio/ekam-report-publisher'
organization {
name 'com.testvagrant.ekam'
url 'https://gitlab.com/testvagrant/automation-platform'
}
issueManagement {
system 'GitLab'
url 'https://gitlab.com/testvagrant/automation-platform/ekam-studio/ekam-report-publisher/issues'
}
licenses {
license {
name 'MIT License'
url 'https://gitlab.com/testvagrant/automation-platform/ekam-studio/ekam-report-publisher/-/blob/master/LICENSE'
distribution 'repo'
}
}
scm {
url 'https://gitlab.com/testvagrant/automation-platform/ekam-studio/ekam-report-publisher'
connection 'https://gitlab.com/testvagrant/automation-platform/ekam-studio/ekam-report-publisher.git'
developerConnection 'git@gitlab.com:testvagrant/automation-platform/ekam-studio/ekam-report-publisher.git'
}
developers {
developer {
name 'Sudarshan GS'
}
developer {
name 'Krishnanand B'
}
}
}
}
}
model {
tasks.generatePomFileForMavenJavaPublication {
destination = file("$buildDir/generated-pom.xml")
}
}
signing {
sign publishing.publications
}