1/* 2 * Copyright (c) Facebook, Inc. and its affiliates. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17plugins { 18 id 'java-library' 19 id 'maven-publish' 20 id 'com.vanniktech.maven.publish' version '0.25.3' 21} 22 23repositories { 24 mavenCentral() 25} 26 27sourceSets { 28 main { 29 java.srcDir 'java' 30 } 31 test { 32 java.srcDir 'test' 33 } 34} 35 36dependencies { 37 implementation 'com.facebook.soloader:nativeloader:0.10.5' 38 implementation 'com.google.code.findbugs:jsr305:3.0.2' 39 testImplementation 'junit:junit:4.13.2' 40 testImplementation 'org.assertj:assertj-core:2.9.0' 41 testImplementation 'org.mockito:mockito-core:2.28.2' 42} 43 44mavenPublishing { 45 coordinates(GROUP, "fbjni-java-only", VERSION_NAME) 46} 47 48task headersJar(type: Jar) { 49 archiveClassifier.set('headers') 50 from("$rootDir/cxx/") { 51 include '**/*.h' 52 } 53} 54 55publishing { 56 publications { 57 withType(MavenPublication).configureEach { 58 artifact(headersJar) 59 } 60 } 61} 62