-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
105 lines (88 loc) · 2.57 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 'application'
id 'java-library'
id 'maven-publish'
id 'net.researchgate.release' version '2.6.0'
id 'com.jfrog.artifactory' version '4.24.21'
}
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
project.group = "org.clyze"
applicationName = project.name
mainClassName = 'org.clyze.scanner.Main'
wrapper {
gradleVersion = '6.2'
}
repositories {
mavenCentral()
}
configurations.all {
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
}
dependencies {
api 'net.fornwall:jelf:0.4.5'
api 'io.kaitai:kaitai-struct-runtime:0.8'
testImplementation('org.junit.jupiter:junit-jupiter-api:5.4.2')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.4.2')
}
jar {
manifest {
attributes 'Implementation-Version' : archiveVersion
}
}
test {
useJUnitPlatform()
maxHeapSize = '1G'
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact tasks.sourcesJar
artifact tasks.javadocJar
}
}
}
if (project.hasProperty('artifactory_user')) {
publishing {
repositories {
maven {
credentials {
username artifactory_user
password artifactory_password
}
//Always publish to the public releases repo
url "${artifactory_contextUrl}/libs-public-release-local"
}
}
}
}
release {
// Use defaults, see https://github.com/researchgate/gradle-release
}
afterReleaseBuild.dependsOn publish
// To configure, set jfrog_user/jfrog_password in [~/.gradle,.]/gradle.properties.
// Upload with: ./gradlew artifactoryPublish
artifactoryPublish {
skip = false //Skip build info analysis and publishing (false by default)
contextUrl = 'http://clyze.jfrog.io/artifactory'
publications ('mavenJava')
properties = ['qa.level': 'basic']
clientConfig.publisher.repoKey = 'default-maven-local'
clientConfig.publisher.username = jfrog_user
clientConfig.publisher.password = jfrog_password
// Minimum file size in KB for which the plugin performs checksum deploy optimization. Default: 10. Set to 0 to disable uploading files with checksum that already exists in Artifactory.
clientConfig.publisher.minChecksumDeploySizeKb = 10
}