-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
105 lines (88 loc) · 2.74 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
plugins {
id "java"
id "com.microsoft.azure.azurefunctions" version "1.4.0"
}
group "com.logicmonitor"
version "2.0.8"
def jerseyVersion = "2.31"
def junitVersion = "5.6.2"
compileJava.options.encoding = "UTF-8"
repositories {
jcenter()
maven {
credentials {
username = System.getenv("GITHUB_USERNAME")
password = System.getenv("GITHUB_TOKEN")
}
url "https://maven.pkg.github.com/logicmonitor/lm-data-sdk-java"
}
mavenCentral()
}
dependencies {
implementation(
"com.logicmonitor:lm-data-sdk:0.0.5-alpha",
"com.microsoft.azure.functions:azure-functions-java-library:1.4.0",
"com.logicmonitor:lm-logs-sdk-java:1.2",
"com.google.code.gson:gson:2.8.6"
)
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3'
implementation 'io.gsonfire:gson-fire:1.8.5'
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'com.jayway.jsonpath:json-path:2.5.0'
implementation 'org.slf4j:slf4j-nop:1.7.25'
testImplementation(
"org.junit.jupiter:junit-jupiter:${junitVersion}",
"com.github.stefanbirkner:system-lambda:1.0.0",
"org.mockito:mockito-core:3.4.4",
"org.glassfish.jersey.test-framework:jersey-test-framework-core:${jerseyVersion}",
"org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:${jerseyVersion}"
)
testCompileOnly(
"junit:junit:4.12"
)
testRuntimeOnly(
"org.junit.vintage:junit-vintage-engine:${junitVersion}"
)
}
clean {
delete "${rootDir}/bin"
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
jar {
manifest {
attributes 'Implementation-Title': project.getName(),
'Implementation-Version': project.getVersion()
}
}
jar.dependsOn test
def azureAppName = System.properties["azureFunction"] ? System.properties["azureFunction"] : rootProject.name
azurefunctions {
subscription = System.properties["azureSubsription"]
resourceGroup = System.properties["azureResourceGroup"]
appName = azureAppName
runtime {
os = "linux"
javaVersion = "11"
}
authentication {
type = "azure_cli"
}
allowTelemetry = false
localDebug = "transport=dt_socket,server=y,suspend=n,address=5005"
}
task copyPackage(type: Copy) {
from("build/azure-functions") {
include "${rootProject.name}.zip"
}
into "package"
eachFile { println "Copied " + it.name }
}
copyPackage.dependsOn azureFunctionsPackageZip
build.finalizedBy copyPackage