@@ -8,17 +8,16 @@ buildscript {
88 }
99 dependencies {
1010 classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
11- classpath ' net.anshulverma.gradle:gradle-fileupload-plugin:1.0.4'
1211 }
1312}
1413
1514plugins {
1615 id ' java'
1716 id ' java-library'
1817 id ' maven-publish'
18+ id ' maven'
1919}
2020apply plugin : ' com.jfrog.bintray'
21- apply plugin : ' net.anshulverma.gradle.fileupload'
2221
2322repositories {
2423 // Use jcenter for resolving dependencies.
@@ -31,12 +30,6 @@ sourceCompatibility = 1.8
3130targetCompatibility = 1.8
3231
3332dependencies {
34- // This dependency is exported to consumers, that is to say found on their compile classpath.
35- api ' org.apache.commons:commons-math3:3.6.1'
36-
37- // This dependency is used internally, and not exposed to consumers on their own compile classpath.
38- implementation ' com.google.guava:guava:28.2-jre'
39-
4033 testImplementation ' org.junit.jupiter:junit-jupiter-api:5.6.0'
4134 testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.6.0'
4235}
@@ -116,150 +109,37 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
116109 from javadoc. destinationDir
117110}
118111
119- task nativeUpload {
120- dependsOn compileJNI
121- doLast {
122- exec {
123- if (OperatingSystem . current(). isLinux()) {
124- commandLine ' sh' , ' -c' , ' curl -T build/natives/lib/Release/Linux/libjotio-' + version. toString() + ' .so -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Linux/' + version. toString() + ' /Linux/' + version. toString() + ' /libjotio-' + version. toString() + ' .so &&' +
125- ' curl -T build/natives/lib/Release/Linux/libopentime.so -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Linux/' + version. toString() + ' /Linux/' + version. toString() + ' /libopentime.so &&' +
126- ' curl -T build/natives/lib/Release/Linux/libopentimelineio.so -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Linux/' + version. toString() + ' /Linux/' + version. toString() + ' /libopentimelineio.so'
127- } else if (OperatingSystem . current(). isMacOsX()) {
128- commandLine ' sh' , ' -c' , " cmd" , " /c" , ' curl -T build/natives/lib/Release/Darwin/jotio-' + version. toString() + ' .dylib -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Darwin/' + version. toString() + ' /Darwin/' + version. toString() + ' /libjotio-' + version. toString() + ' .dylib &&' +
129- ' curl -T build/natives/lib/Release/Linux/opentime.dylib -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Linux/' + version. toString() + ' /Linux/' + version. toString() + ' /libopentime.dylib &&' +
130- ' curl -T build/natives/lib/Release/Linux/opentimelineio.dylib -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Linux/' + version. toString() + ' /Linux/' + version. toString() + ' /libopentimelineio.dylib'
131- } else if (OperatingSystem . current(). isWindows()) {
132- commandLine " cmd" , " /c" , ' curl -T build\\ natives\\ bin\\ Release\\ Windows\\ jotio-' + version. toString() + ' .dll -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Windows/' + version. toString() + ' /Windows/' + version. toString() + ' /jotio-' + version. toString() + ' .dll &&' +
133- ' curl -T build\\ natives\\ bin\\ Release\\ Windows\\ opentime.dll -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Windows/' + version. toString() + ' /Windows/' + version. toString() + ' /opentime.dll &&' +
134- ' curl -T build\\ natives\\ bin\\ Release\\ Windows\\ opentimelineio.dll -u' + System . getProperty(' bintray.user' ). toString() + ' :' + System . getProperty(' bintray.key' ). toString() + ' https://api.bintray.com/content/karthikriyer/java-opentimelineio/OpenTimelineIO-Windows/' + version. toString() + ' /Windows/' + version. toString() + ' /opentimelineio.dll'
135- }
136- }
137- }
138- }
139-
140- task nativeDownload {
141- outputs. upToDateWhen { false }
142- doLast {
143- exec {
144- if (OperatingSystem . current(). isLinux()) {
145- commandLine ' sh' , ' -c' , ' mkdir -p build/natives/downloads/Linux &&' +
146- ' mkdir -p build/natives/downloads/Windows &&' +
147- ' mkdir -p build/natives/downloads/Darwin &&' +
148-
149- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /libjotio-' + version. toString() + ' .so" -o build/natives/downloads/Linux/libjotio-' + version. toString() + ' .so && ' +
150- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /libopentime.so" -o build/natives/downloads/Linux/libopentime.so && ' +
151- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /libopentimelineio.so" -o build/natives/downloads/Linux/libopentimelineio.so &&' +
152-
153- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /jotio-' + version. toString() + ' .dll" > build/natives/downloads/Windows/jotio-' + version. toString() + ' .dll && ' +
154- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /opentime.dll" > build/natives/downloads/Windows/opentime.dll && ' +
155- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /opentimelineio.dll" > build/natives/downloads/Windows/opentimelineio.dll'
156-
157- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/libjotio-' + version.toString() + '.dylib -o build/natives/downloads/Darwin/libjotio-' + version.toString() + '.dylib && ' +
158- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/libopentime.dylib -o build/natives/downloads/Darwin/libopentime.dylib && ' +
159- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/libopentimelineio.dylib -o build/natives/downloads/Darwin/libopentimelineio.dylib'
160- } else if (OperatingSystem . current(). isMacOsX()) {
161- commandLine ' sh' , ' -c' , ' mkdir -p build/natives/downloads/Linux &&' +
162- ' mkdir -p build/natives/downloads/Windows &&' +
163- ' mkdir -p build/natives/downloads/Darwin &&' +
164-
165- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /libjotio-' + version. toString() + ' .so" -o build/natives/downloads/Linux/libjotio-' + version. toString() + ' .so && ' +
166- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /libopentime.so" -o build/natives/downloads/Linux/libopentime.so && ' +
167- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /libopentimelineio.so" -o build/natives/downloads/Linux/libopentimelineio.so &&' +
168-
169- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /jotio-' + version. toString() + ' .dll" > build/natives/downloads/Windows/jotio-' + version. toString() + ' .dll && ' +
170- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /opentime.dll" > build/natives/downloads/Windows/opentime.dll && ' +
171- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /opentimelineio.dll" > build/natives/downloads/Windows/opentimelineio.dll'
172-
173- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/libjotio-' + version.toString() + '.dylib -o build/natives/downloads/Darwin/libjotio-' + version.toString() + '.dylib && ' +
174- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/libopentime.dylib -o build/natives/downloads/Darwin/libopentime.dylib && ' +
175- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/libopentimelineio.dylib -o build/natives/downloads/Darwin/libopentimelineio.dylib'
176- } else if (OperatingSystem . current(). isWindows()) {
177- commandLine " cmd" , " /c" , ' if not exist build\\ natives\\ downloads\\ Windows mkdir build\\ natives\\ downloads\\ Windows &&' +
178- ' if not exist build\\ natives\\ downloads\\ Linux mkdir build\\ natives\\ downloads\\ Linux &&' +
179- ' if not exist build\\ natives\\ downloads\\ Darwin mkdir build\\ natives\\ downloads\\ Darwin &&' +
180-
181- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /jotio-' + version. toString() + ' .dll" -o build\\ natives\\ downloads\\ Windows\\ jotio-' + version. toString() + ' .dll && ' +
182- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /opentime.dll" -o build\\ natives\\ downloads\\ Windows\\ opentime.dll && ' +
183- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Windows/' + version. toString() + ' /opentimelineio.dll" -o build\\ natives\\ downloads\\ Windows\\ opentimelineio.dll &&' +
184-
185- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /jotio-' + version. toString() + ' .so" -o build\\ natives\\ downloads\\ Linux\\ jotio-' + version. toString() + ' .so && ' +
186- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /opentime.so" -o build\\ natives\\ downloads\\ Linux\\ opentime.so && ' +
187- ' curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Linux/' + version. toString() + ' /opentimelineio.so" -o build\\ natives\\ downloads\\ Linux\\ opentimelineio.so '
188-
189- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/jotio-' + version.toString() + '.dylib" -o build\\natives\\downloads\\Darwin\\jotio-' + version.toString() + '.dylib && ' +
190- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/opentime.dylib" -o build\\natives\\downloads\\Darwin\\opentime.dylib && ' +
191- // 'curl -L --fail "https://dl.bintray.com/karthikriyer/java-opentimelineio/Darwin/' + version.toString() + '/opentimelineio.dylib" -o build\\natives\\downloads\\Darwin\\opentimelineio.dylib'
192- }
193- }
194- }
195- }
196-
197112artifacts {
198113 archives sourcesJar
199114 archives javadocJar
200115}
201116
202- def pomConfig = {
203- licenses {
204- license {
205- name " Modified Apache 2.0 License"
206- url " https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/master/LICENSE.txt"
207- distribution " repo"
208- }
209- }
210- developers {
211- developer {
212- id " OpenTimelineIO"
213- name " Contributors to the OpenTimelineIO project"
214- email " "
215- }
216- }
217-
218- scm {
219- url " https://github.com/PixarAnimationStudios/OpenTimelineIO"
220- }
221- }
222-
223- publishing {
224- publications {
225- mavenPublication(MavenPublication ) {
226- from components. java
227- artifact sourcesJar {
228- classifier " sources"
117+ task createPom {
118+ pom {
119+ project {
120+ groupId ' io.opentimeline'
121+ artifactId ' opentimelineio'
122+ version version. toString()
123+ description ' OpenTimelineIO is an interchange format and API for editorial cut information. OTIO is not a container format for media, rather it contains information about the order and length of cuts and references to external media.'
124+ url ' opentimeline.io'
125+ name ' OpenTimelineIO'
126+ licenses {
127+ license {
128+ name " Modified Apache 2.0 License"
129+ url " https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/master/LICENSE.txt"
130+ distribution " repo"
131+ }
229132 }
230- artifact javadocJar {
231- classifier " javadoc"
133+ developers {
134+ developer {
135+ id " OpenTimelineIO"
136+ name " Contributors to the OpenTimelineIO project"
137+ 138+ }
232139 }
233- groupId ' io.opentimeline'
234- artifactId ' java-opentimelineio'
235- version ' 0.14.0'
236- pom. withXml {
237- def root = asNode()
238- root. appendNode(' description' , ' OpenTimelineIO is an interchange format and API for editorial cut information. OTIO is not a container format for media, rather it contains information about the order and length of cuts and references to external media.' )
239- root. appendNode(' name' , ' OpenTimelineIO' )
240- root. appendNode(' url' , ' https://github.com/PixarAnimationStudios/OpenTimelineIO' )
241- root. children(). last() + pomConfig
140+ scm {
141+ url " https://github.com/PixarAnimationStudios/OpenTimelineIO"
242142 }
243143 }
244- }
144+ }. writeTo( " build/pom/opentimelineio- " + version . toString() + " .pom " )
245145}
246-
247- bintray {
248- user = System . getProperty(' bintray.user' )
249- key = System . getProperty(' bintray.key' )
250- publications = [' mavenPublication' ]
251-
252- pkg {
253- repo = ' java-opentimelineio'
254- name = ' OpenTimelineIO'
255- userOrg = ' '
256- licenses = [' Apache-2.0' ]
257- vcsUrl = ' https://github.com/KarthikRIyer/OpenTimelineIO'
258- version {
259- name = ' 0.14.0'
260- desc = ' 0.14.0'
261- released = new Date ()
262- }
263- }
264-
265- }
0 commit comments