-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
114 lines (91 loc) · 2.97 KB
/
build.gradle
File metadata and controls
114 lines (91 loc) · 2.97 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.5/userguide/java_library_plugin.html
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'com.adarshr.test-logger' version '2.0.0'
id 'jacoco'
id 'checkstyle'
id 'maven-publish'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
api 'com.amazonaws:aws-lambda-java-core:1.2.0'
api 'org.immutables:gson:2.8.2'
api 'org.immutables:value-annotations:2.8.2'
annotationProcessor 'org.immutables:value:2.8.2'
annotationProcessor 'org.projectlombok:lombok:1.18.10'
compileOnly 'org.projectlombok:lombok:1.18.10'
// This dependency is found on compile classpath of this component and consumers.
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'org.slf4j:slf4j-api:1.7.28'
implementation 'org.slf4j:slf4j-simple:1.7.28'
// Use JUnit Jupiter API for testing.
testImplementation 'junit:junit:4.12'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testImplementation 'org.apache.httpcomponents:httpclient:4.5.10'
testImplementation 'org.apache.httpcomponents:httpclient:4.5.10:tests'
testImplementation 'org.easymock:easymock:4.0.2'
// Use JUnit Jupiter Engine for testing.
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.2'
}
test {
// Use junit platform for unit tests
useJUnitPlatform()
}
// Allows VS Code to put generated source files on the classpath
sourceSets.main.java.srcDirs += new File(buildDir, '/generated/sources/annotationProcessor/java/main')
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.7
}
}
}
}
checkstyle {
toolVersion '8.26'
}
// Workaround to exclude generated sources
checkstyleMain {
source = fileTree('src/main/java')
}
def srcDelomboked = 'build/src-delomboked'
task delombok {
inputs.files file('src/main/java')
outputs.dir file(srcDelomboked)
description 'Delomboks the source code'
doLast {
ant.taskdef(classname: 'lombok.delombok.ant.Tasks$Delombok', classpath: configurations.annotationProcessor.asPath, name: 'delombok')
ant.mkdir(dir: srcDelomboked)
ant.delombok(verbose: 'true', encoding: 'UTF-8', to: srcDelomboked, from: 'src/main/java')
}
}
javadoc {
dependsOn delombok
source = srcDelomboked
classpath = sourceSets.main.compileClasspath
}