1
+ buildscript {
2
+ repositories {
3
+ jcenter()
4
+ }
5
+ dependencies {
6
+ classpath ' com.github.dcendents:android-maven-gradle-plugin:1.4.1'
7
+ classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
8
+ }
9
+ }
10
+
1
11
plugins {
2
12
id ' java'
3
13
}
@@ -7,6 +17,14 @@ version '1.0.0'
7
17
8
18
sourceCompatibility = 1.8
9
19
20
+ if (JavaVersion . current(). isJava8Compatible()) {
21
+ allprojects {
22
+ tasks. withType(Javadoc ) {
23
+ options. addStringOption(' Xdoclint:none' , ' -quiet' )
24
+ }
25
+ }
26
+ }
27
+
10
28
repositories {
11
29
mavenCentral()
12
30
jcenter()
@@ -27,3 +45,106 @@ dependencies {
27
45
// OkHttp Digest
28
46
compile ' com.burgstaller:okhttp-digest:1.18'
29
47
}
48
+
49
+ ext {
50
+ bintrayRepo = ' ONVIF-Java'
51
+ bintrayName = ' ONVIF-Java'
52
+
53
+ publishedGroupId = ' be.teletask.onvif'
54
+ libraryName = ' ONVIF-Java'
55
+ artifact = ' onvif'
56
+
57
+ libraryDescription = ' A Java client library to discover, control and manage ONVIF-supported devices.'
58
+
59
+ siteUrl = ' https://github.com/RootSoft/ONVIF-Java'
60
+ gitUrl = ' https://github.com/RootSoft/ONVIF-Java.git'
61
+
62
+ libraryVersion = ' 1.0.0'
63
+
64
+ developerId = ' tomasverhelst'
65
+ developerName = ' Tomas Verhelst'
66
+ developerEmail
= ' [email protected] '
67
+
68
+ licenseName = ' The Apache Software License, Version 2.0'
69
+ licenseUrl = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
70
+ allLicenses = [" Apache-2.0" ]
71
+ }
72
+
73
+ apply plugin : ' com.github.dcendents.android-maven'
74
+ apply plugin : ' com.jfrog.bintray'
75
+
76
+ group = publishedGroupId
77
+ version = libraryVersion
78
+
79
+ install {
80
+ repositories. mavenInstaller {
81
+ pom. project {
82
+ packaging ' jar'
83
+ groupId publishedGroupId
84
+ artifactId artifact
85
+
86
+ name libraryName
87
+ description libraryDescription
88
+ url siteUrl
89
+
90
+ licenses {
91
+ license {
92
+ name licenseName
93
+ url licenseUrl
94
+ }
95
+ }
96
+ developers {
97
+ developer {
98
+ id developerId
99
+ name developerName
100
+ email developerEmail
101
+ }
102
+ }
103
+ scm {
104
+ connection gitUrl
105
+ developerConnection gitUrl
106
+ url siteUrl
107
+ }
108
+ }
109
+ }
110
+ }
111
+
112
+ task sourcesJar (type : Jar ) {
113
+ classifier = ' sources'
114
+ from sourceSets. main. java. srcDirs
115
+ }
116
+
117
+ task javadocJar (type : Jar , dependsOn : javadoc) {
118
+ classifier = ' javadoc'
119
+ from javadoc. destinationDir
120
+ }
121
+
122
+ artifacts {
123
+ archives javadocJar
124
+ archives sourcesJar
125
+ }
126
+
127
+ Properties properties = new Properties ()
128
+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
129
+
130
+ bintray {
131
+ user = properties. getProperty(" bintray.user" )
132
+ key = properties. getProperty(" bintray.apikey" )
133
+
134
+ configurations = [' archives' ]
135
+ pkg {
136
+ repo = bintrayRepo
137
+ name = bintrayName
138
+ desc = libraryDescription
139
+ websiteUrl = siteUrl
140
+ vcsUrl = gitUrl
141
+ licenses = allLicenses
142
+ dryRun = false
143
+ publish = true
144
+ override = false
145
+ publicDownloadNumbers = true
146
+ version {
147
+ desc = libraryDescription
148
+ }
149
+ }
150
+ }
0 commit comments