This repository has been archived by the owner on Aug 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
116 lines (92 loc) · 2.82 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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
apply from: rootProject.file('extras.gradle')
group = GROUP
version = VERSION
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
compile group: 'com.flash3388.flashlib', name: 'flashlib', version: '2.0.0-beta.7'
compile group: 'org.openpnp', name: 'opencv', version: '3.2.0-0'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.7.22'
}
jar {
archiveBaseName.set(project.name)
}
task createSources(type: Jar, dependsOn: 'classes') {
from sourceSets.main.allSource
archiveBaseName.set(project.name)
archiveClassifier.set('sources')
}
task createJavadoc(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
archiveBaseName.set(project.name)
archiveClassifier.set('javadoc')
}
task flashlibCvAll(type: Jar, dependsOn: build) {
dependsOn createSources
dependsOn createJavadoc
archiveFileName.set('flashlib-cv-all.jar')
destinationDirectory.set(rootProject.buildDir)
from sourceSets.main.output
from sourceSets.main.allSource
from javadoc.destinationDir
}
publishing {
publications {
mavenFlashlib(MavenPublication) {
from components.java
artifact createJavadoc
artifact createSources
pom {
name = 'FlashCv'
description = 'OpenCV Plugin for Flashlib'
url = 'https://github.com/Flash3388/FlashCv'
licenses {
license {
name = 'BSD 3-Clause License'
url = 'https://opensource.org/licenses/BSD-3-Clause'
}
}
developers {
developer {
id = 'tomtzook'
name = 'Tom Tzook'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/Flash3388/FlashCv.git'
developerConnection = 'scm:git:ssh://github.com/Flash3388/FlashCv.git'
url = 'https://github.com/Flash3388/FlashCv'
}
}
}
}
repositories {
maven {
if (isReleaseBuild()) {
name = 'NexusStaging'
url = NEXUS_RELEASE_REPOSITORY_URL
} else {
name = 'NexusSnapshot'
url = NEXUS_SNAPSHOT_REPOSITORY_URL
}
credentials {
username getNexusUsername()
password getNexusPassword()
}
}
}
}
if (shouldSign()) {
signing {
sign publishing.publications.mavenFlashlib
}
}