-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (63 loc) · 1.86 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
plugins {
id "java"
id "maven-publish"
id "com.jfrog.bintray" version "1.8.4"
}
group = project_group
version = project_version
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
maven {
url "http://maven.aliyun.com/nexus/content/groups/public"
}
}
dependencies {
def log4jVersion = "2.11.1"
def lombokVersion = "1.18.2"
testImplementation "io.vavr:vavr:0.10.0"
testImplementation "org.apache.logging.log4j:log4j-api:$log4jVersion"
testImplementation "org.apache.logging.log4j:log4j-core:$log4jVersion"
testImplementation "org.apache.logging.log4j:log4j-jcl:$log4jVersion"
testImplementation "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
testImplementation "com.google.guava:guava:27.0-jre"
testImplementation "org.projectlombok:lombok:$lombokVersion"
testImplementation "junit:junit:4.12"
testImplementation "org.assertj:assertj-core:3.8.0"
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
testAnnotationProcessor("org.projectlombok:lombok:$lombokVersion")
}
jar {
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
// manifest {
// attributes 'Main-Class': ''
// }
}
task srcJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task docJar(type: Jar, dependsOn: srcJar) {
archiveClassifier = 'javadoc'
from 'build/docs/javadoc'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
artifacts {
archives srcJar
archives docJar
}
bintray {
user = project.hasProperty('bintray_user') ? project.property('bintray_user') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintray_key') ? project.property('bintray_key') : System.getenv('BINTRAY_KEY')
configurations = ['archives']
publications = ['mavenJava']
pkg {
repo = bintray_repo
name = project_name
}
}