forked from PhotonVision/photon-libcamera-gl-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.gradle
46 lines (39 loc) · 1.23 KB
/
publish.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
apply plugin: 'maven-publish'
def nativeName = wpilibTools.platformMapper.currentPlatform.platformName;
def artifactGroupId = 'org.photonvision'
def baseArtifactId = "photon-libcamera-gl-driver"
task nativeLibraryJar(type: Jar, dependsOn: copyNativeLibrary) {
archiveClassifier = nativeName
from outputsFolder
}
build.dependsOn nativeLibraryJar
publishing {
repositories {
maven {
url ('https://maven.photonvision.org/' + (isDev ? 'snapshots' : 'releases'))
credentials {
username 'ghactions'
password System.getenv("ARTIFACTORY_API_KEY")
}
}
}
publications {
mavenJava(MavenPublication) {
groupId = artifactGroupId
artifactId = "${baseArtifactId}-java"
version = pubVersion;// + "-" + nativeName;
from components.java
}
mavenJNI(MavenPublication) {
groupId = artifactGroupId
artifactId = "${baseArtifactId}-jni"
version = pubVersion;// + "-" + nativeName;
artifact nativeLibraryJar
}
}
}
tasks.withType(PublishToMavenRepository) {
doFirst {
println("Publishing mrcal-java to " + repository.url)
}
}