forked from kobylynskyi/graphql-java-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
114 lines (95 loc) · 2.66 KB
/
build.gradle
File metadata and controls
114 lines (95 loc) · 2.66 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
buildscript {
ext {
artifactory_user = System.getenv('ARTIFACTORY_LW_USER')
artifactory_password = System.getenv('ARTIFACTORY_LW_KEY')
}
}
plugins {
id "java"
id "idea"
id "ivy-publish"
id "jacoco"
id "java-library"
id "signing"
id "maven-publish"
id "org.sonarqube" version "3.2.0"
}
def graphqlCodegenVersion = '5.4.1' // This variable used in the automatic release process
group = "com.lifeway.contentplatform"
version = graphqlCodegenVersion
repositories {
mavenCentral()
jcenter()
}
dependencies {
compileOnly "org.freemarker:freemarker:2.3.31"
compileOnly "com.graphql-java:graphql-java:16.2"
compileOnly "com.fasterxml.jackson.core:jackson-databind:2.13.3"
compileOnly "com.typesafe:config:1.4.1"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.7.1"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1"
testImplementation "org.hamcrest:java-hamcrest:2.0.0.0"
}
test.useJUnitPlatform()
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("build/jacoco/*.exec")
sourceSets sourceSets.main
reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled false
csv.enabled false
}
}
configurations {
testCompile.extendsFrom compileOnly
}
test {
testLogging {
events "failed"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
showStandardStreams = false
}
}
codeCoverageReport.dependsOn test
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'com.lifeway.contentplatform'
artifactId = 'graphql-java-codegen'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
repositories {
maven {
url 'https://artifactory.prod.lifeway.com/artifactory/contentplatform'
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
}
if (project.hasProperty("signing.keyId")) {
signing {
sign publishing.publications.mavenJava
}
}