-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
140 lines (120 loc) · 4.38 KB
/
build.gradle
File metadata and controls
140 lines (120 loc) · 4.38 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
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
plugins {
id "net.ltgt.apt" version "0.10"
id "com.github.hierynomus.license" version "0.14.0"
id "java"
id "idea"
id "checkstyle"
id "signing"
id "maven"
}
group 'nl.dead-pixel.telebot'
version '0.3.3'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
idea {
project {
languageLevel = '1.8'
}
module {
downloadJavadoc = true // defaults to false
downloadSources = true
}
}
task generateDocs(type: Javadoc) {
source = sourceSets.main.allJava
classpath = sourceSets.main.compileClasspath
options.links("https://docs.oracle.com/javase/8/docs/api/")
options.links("http://reactivex.github.io/RxJava/2.x/javadoc/")
options.links("https://square.github.io/retrofit/2.x/retrofit/")
options.links("https://google.github.io/dagger/api/2.0/")
options.links("https://fasterxml.github.io/jackson-core/javadoc/2.8/")
options.links("https://fasterxml.github.io/jackson-annotations/javadoc/2.8/")
options.links("https://fasterxml.github.io/jackson-databind/javadoc/2.8/")
options.links("https://www.slf4j.org/apidocs/")
destinationDir = file('docs')
exclude '**/admin_bot/**'
finalizedBy 'copyStylesheet'
}
task copyStylesheet(type: Copy) {
from 'misc/javadoc_stylesheet.css'
into 'docs'
rename 'javadoc_(stylesheet.css)', '$1'
}
license {
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.name = 'Remon Schopmeijer (7914 7FFF 4E3C 86DE)'
ext.email = 'support-telebot@dead-pixel.nl'
header = file('LICENSE.header')
strictCheck = true
}
def deployUsername = hasProperty('ossrhUsername') ? ossrhUsername : System.getenv('ossrhUsername')
def deployPassword = hasProperty('ossrhPassword') ? ossrhPassword : System.getenv('ossrhPassword')
uploadArchives {
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: deployUsername, password: deployPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: deployUsername, password: deployPassword)
}
pom.project {
name 'nl.dead-pixel.telebot:telebot'
packaging 'jar'
// optionally artifactId can be defined here
description 'Java Telegram Bot API Library, Uses RxJava2 and Retrofit'
url 'https://github.com/iSDP/Telebot'
scm {
connection 'scm:git:https://github.com/iSDP/Telebot.git'
developerConnection 'scm:git:https://github.com/iSDP/Telebot.git'
url 'https://github.com/iSDP/Telebot'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'iSDP'
name 'Remon Schopmeijer'
email 'remon@dead-pixel.nl'
}
}
}
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
dependencies {
testCompile 'junit:junit:4.12'
compile 'com.google.dagger:dagger:2.10'
apt 'com.google.dagger:dagger-compiler:2.10'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-jackson:2.3.0'
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.8.0'
compile 'org.slf4j:slf4j-api:1.8.0-alpha2'
compile 'org.slf4j:slf4j-simple:1.8.0-alpha2'
compile 'io.reactivex.rxjava2:rxjava:2.1.0'
compile 'com.fasterxml.jackson.core:jackson-core:2.8.8'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.8'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.8'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.3'
}