-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
155 lines (135 loc) · 3.43 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
plugins {
id 'com.jfrog.artifactory' version '4.9.8'
id 'org.javamodularity.moduleplugin' version '1.6.0'
id 'idea'
id 'java'
id 'maven'
}
defaultTasks 'build'
sourceCompatibility = '1.9'
repositories {
mavenCentral()
jcenter()
mavenLocal()
}
ext {
isSnapshot = true
hktBaseVersion = '0.10.0'
hktVersion = hktBaseVersion + (isSnapshot ? '-SNAPSHOT' : '')
autoService = 'com.google.auto.service:auto-service:1.0-rc6'
derive4jVersion = '1.1.1'
derive4jAnnotation = "org.derive4j:derive4j-annotation:$derive4jVersion"
}
group 'org.derive4j.hkt'
version hktVersion
dependencies {
compileOnly derive4jAnnotation
compileOnly autoService
annotationProcessor "org.derive4j:derive4j:$derive4jVersion"
annotationProcessor autoService
testCompile 'junit:junit:4.12'
testCompile('com.google.testing.compile:compile-testing:0.18') {
exclude module: 'auto-value'
}
testCompileOnly derive4jAnnotation
testCompileOnly autoService
testAnnotationProcessor rootProject
testImplementation rootProject
}
test {
testLogging.showStandardStreams = true
moduleOptions {
runOnClasspath = true
}
}
sourceSets {
generated {
java.srcDir "$buildDir/generated/sources/annotationProcessor/java/main"
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:all'
options.encoding = "UTF-8"
}
task myJavadocs(type: Javadoc) {
source = sourceSets.main.java + sourceSets.generated.java
classpath = sourceSets.main.compileClasspath
doFirst {
options.addStringOption('-module-path', classpath.asPath)
}
verbose = true
}
task javadocJar(type: Jar, dependsOn: 'myJavadocs') {
archiveClassifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource + sourceSets.generated.java
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
install {
repositories.mavenInstaller {
pom {
groupId = project.group
project {
name = 'HKT'
packaging 'jar'
description 'Interfaces and type-checker for higher kinded types support in Java'
url 'https://github.com/derive4j/hkt'
organization {
name = 'Derive4J HKT contributors'
}
scm {
url 'git:https://github.com/derive4j/hkt.git'
}
licenses {
license {
name = 'BSD-3'
url 'https://github.com/derive4j/hkt/blob/master/LICENSE'
distribution 'repo'
}
}
developers {
developer {
name = 'Grégoire Neuville'
}
developer {
name = 'Jean-Baptiste Giraudeau'
email '[email protected]'
}
}
}
}
}
}
artifactoryPublish {
dependsOn sourcesJar, javadocJar
}
artifactory {
contextUrl = 'http:https://oss.jfrog.org/artifactory' //The base Artifactory URL if not overridden by the publisher/resolver
publish {
repository {
// The Artifactory repository key to publish to :
if (isSnapshot) {
repoKey = 'oss-snapshot-local'
} else {
repoKey = 'oss-release-local'
}
username = jfrogUsername //The publisher user name
password = jfrogPassword //The publisher password
}
defaults {
publishConfigs('archives')
}
}
resolve {
repository {
repoKey = 'libs-releases' //The Artifactory (preferably virtual) repository key to resolve from
}
}
}