forked from pickuppdev/opencv-android-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
97 lines (82 loc) · 2.59 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
buildscript {
repositories {
mavenLocal()
google()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.28.3"
}
}
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
group = 'com.bullhorn'
version = '3.4.4'
allprojects {
repositories {
mavenLocal()
mavenCentral()
google()
}
}
android {
compileSdkVersion 30
buildToolsVersion "30"
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
abortOnError false
}
sourceSets {
main.java.srcDirs += 'src/main/java'
}
}
publishing {
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/opencv-android-sdk-release.aar")
groupId 'org.opencv.android'
artifactId 'opencv-android-sdk'
version this.version
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
// Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
// Ensure dependencies such as fileTree are not included in the pom.
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
artifactory {
publish {
contextUrl = "https://artifactory.bullhorn.com/artifactory"
repository {
repoKey = version.contains('SNAPSHOT') ? 'bh-snapshots' : 'bh-releases'
username = project.property('artifactoryUsername') ?: System.getenv('ARTIFACTORY_USER')
password = project.property('artifactoryPassword') ?: System.getenv('ARTIFACTORY_PASS')
maven = true
}
defaults {
publications('Production')
publishArtifacts = true
publishPom = true
}
}
}