1buildscript { 2 repositories { 3 maven { 4 url "https://plugins.gradle.org/m2/" 5 } 6 } 7 dependencies { 8 classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.13" 9 } 10} 11 12apply plugin: "net.ltgt.errorprone" 13apply plugin: 'com.android.library' 14apply plugin: 'maven-publish' 15apply plugin: 'ivy-publish' 16apply plugin: 'com.jfrog.artifactory' 17 18version = VERSION_NAME 19 20android { 21 compileSdkVersion 28 22 buildToolsVersion '28.0.3' 23 24 android { 25 lintOptions { 26 disable 'InvalidPackage' 27 warning 'NewApi' 28 } 29 } 30 31 defaultConfig { 32 minSdkVersion 1 33 targetSdkVersion 28 34 versionName VERSION_NAME 35 } 36 37 externalNativeBuild { 38 cmake { 39 path 'CMakeLists.txt' 40 } 41 } 42} 43 44tasks.withType(JavaCompile) { 45 options.compilerArgs += ["-Xep:StringSplitter:OFF"] 46} 47 48task sourcesJar(type: Jar) { 49 classifier = 'sources' 50 from android.sourceSets.main.java.srcDirs 51} 52 53task javadoc(type: Javadoc) { 54 source = android.sourceSets.main.java.srcDirs 55 classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) 56} 57 58task javadocJar(type: Jar, dependsOn: javadoc) { 59 classifier = 'javadoc' 60 from javadoc.destinationDir 61} 62 63publishing { 64 publications { 65 ivyLib(IvyPublication) { 66 from new org.gradle.api.internal.java.JavaLibrary(new org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact(project.getName(), 'aar', 'aar', null, new Date(), new File("$buildDir/outputs/aar/${project.getName()}-release.aar"), assemble), project.configurations.implementation.getAllDependencies()) 67 artifact sourcesJar 68 artifact javadocJar 69 } 70 71 lib(MavenPublication) { 72 from new org.gradle.api.internal.java.JavaLibrary(new org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact(project.getName(), 'aar', 'aar', null, new Date(), new File("$buildDir/outputs/aar/${project.getName()}-release.aar"), assemble), project.configurations.implementation.getAllDependencies()) 73 74 artifact sourcesJar 75 artifact javadocJar 76 77 pom.withXml { 78 asNode().children().last() + { 79 resolveStrategy = Closure.DELEGATE_FIRST 80 description = 'Implementation of the Mockito Inline API for use on the Android Dalvik VM' 81 url 'https://github.com/linkedin/dexmaker' 82 scm { 83 url 'https://github.com/linkedin/dexmaker' 84 connection 'scm:git:git://github.com/linkedin/dexmaker.git' 85 developerConnection 'https://github.com/linkedin/dexmaker.git' 86 } 87 licenses { 88 license { 89 name 'The Apache Software License, Version 2.0' 90 url 'http://www.apache.org/license/LICENSE-2.0.txt' 91 distribution 'repo' 92 } 93 } 94 95 developers { 96 developer { 97 id 'com.linkedin' 98 name 'LinkedIn Corp' 99 email '' 100 } 101 } 102 } 103 } 104 } 105 } 106} 107 108repositories { 109 jcenter() 110 google() 111} 112 113dependencies { 114 implementation project(':dexmaker') 115 116 implementation 'org.mockito:mockito-core:2.25.0', { exclude group: 'net.bytebuddy' } 117} 118 119