github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/java-legacy/build.gradle (about) 1 apply plugin: 'idea' 2 apply plugin: 'eclipse' 3 apply plugin: 'java' 4 5 group = 'io.lakefs' 6 version = '0.1.0-SNAPSHOT' 7 8 buildscript { 9 repositories { 10 mavenCentral() 11 } 12 dependencies { 13 classpath 'com.android.tools.build:gradle:2.3.+' 14 classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' 15 } 16 } 17 18 repositories { 19 mavenCentral() 20 } 21 sourceSets { 22 main.java.srcDirs = ['src/main/java'] 23 } 24 25 if(hasProperty('target') && target == 'android') { 26 27 apply plugin: 'com.android.library' 28 apply plugin: 'com.github.dcendents.android-maven' 29 30 android { 31 compileSdkVersion 25 32 buildToolsVersion '25.0.2' 33 defaultConfig { 34 minSdkVersion 14 35 targetSdkVersion 25 36 } 37 compileOptions { 38 sourceCompatibility JavaVersion.VERSION_1_8 39 targetCompatibility JavaVersion.VERSION_1_8 40 } 41 42 // Rename the aar correctly 43 libraryVariants.all { variant -> 44 variant.outputs.each { output -> 45 def outputFile = output.outputFile 46 if (outputFile != null && outputFile.name.endsWith('.aar')) { 47 def fileName = "${project.name}-${variant.baseName}-${version}.aar" 48 output.outputFile = new File(outputFile.parent, fileName) 49 } 50 } 51 } 52 53 dependencies { 54 provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" 55 } 56 } 57 58 afterEvaluate { 59 android.libraryVariants.all { variant -> 60 def task = project.tasks.create "jar${variant.name.capitalize()}", Jar 61 task.description = "Create jar artifact for ${variant.name}" 62 task.dependsOn variant.javaCompile 63 task.from variant.javaCompile.destinationDir 64 task.destinationDir = project.file("${project.buildDir}/outputs/jar") 65 task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" 66 artifacts.add('archives', task); 67 } 68 } 69 70 task sourcesJar(type: Jar) { 71 from android.sourceSets.main.java.srcDirs 72 classifier = 'sources' 73 } 74 75 artifacts { 76 archives sourcesJar 77 } 78 79 } else { 80 81 apply plugin: 'java' 82 apply plugin: 'maven-publish' 83 84 sourceCompatibility = JavaVersion.VERSION_1_8 85 targetCompatibility = JavaVersion.VERSION_1_8 86 87 publishing { 88 publications { 89 maven(MavenPublication) { 90 artifactId = 'api-client' 91 from components.java 92 } 93 } 94 } 95 96 task execute(type:JavaExec) { 97 main = System.getProperty('mainClass') 98 classpath = sourceSets.main.runtimeClasspath 99 } 100 } 101 102 ext { 103 jakarta_annotation_version = "1.3.5" 104 } 105 106 dependencies { 107 implementation 'io.swagger:swagger-annotations:1.5.24' 108 implementation "com.google.code.findbugs:jsr305:3.0.2" 109 implementation 'com.squareup.okhttp3:okhttp:4.9.1' 110 implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' 111 implementation 'com.google.code.gson:gson:2.8.6' 112 implementation 'io.gsonfire:gson-fire:1.8.4' 113 implementation 'org.openapitools:jackson-databind-nullable:0.2.1' 114 implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' 115 implementation 'org.threeten:threetenbp:1.4.3' 116 implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" 117 testImplementation 'junit:junit:4.13.1' 118 testImplementation 'org.mockito:mockito-core:3.11.2' 119 } 120 121 javadoc { 122 options.tags = [ "http.response.details:a:Http Response Details" ] 123 }