Home | History | Annotate | Download | only in dexmaker-mockito-inline-extended
      1 buildscript {
      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 
     12 apply plugin: "net.ltgt.errorprone"
     13 apply plugin: 'com.android.library'
     14 apply plugin: 'maven-publish'
     15 apply plugin: 'ivy-publish'
     16 apply plugin: 'com.jfrog.artifactory'
     17 
     18 version = VERSION_NAME
     19 
     20 android {
     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     compileOptions {
     44         targetCompatibility 1.8
     45         sourceCompatibility 1.8
     46     }
     47 }
     48 
     49 tasks.withType(JavaCompile) {
     50     options.compilerArgs += ["-Xep:StringSplitter:OFF"]
     51 }
     52 
     53 task sourcesJar(type: Jar) {
     54     classifier = 'sources'
     55     from android.sourceSets.main.java.srcDirs
     56 }
     57 
     58 task javadoc(type: Javadoc) {
     59     source = android.sourceSets.main.java.srcDirs
     60     classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
     61     failOnError false
     62 }
     63 
     64 task javadocJar(type: Jar, dependsOn: javadoc) {
     65     classifier = 'javadoc'
     66     from javadoc.destinationDir
     67 }
     68 
     69 publishing {
     70     publications {
     71         ivyLib(IvyPublication) {
     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             artifact sourcesJar
     74             artifact javadocJar
     75         }
     76 
     77         lib(MavenPublication) {
     78             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())
     79 
     80             artifact sourcesJar
     81             artifact javadocJar
     82 
     83             pom.withXml {
     84                 asNode().children().last() + {
     85                     resolveStrategy = Closure.DELEGATE_FIRST
     86                     description = 'Extension of the Mockito Inline API to allow mocking static methods on the Android Dalvik VM'
     87                     url 'https://github.com/linkedin/dexmaker'
     88                     scm {
     89                         url 'https://github.com/linkedin/dexmaker'
     90                         connection 'scm:git:git://github.com/linkedin/dexmaker.git'
     91                         developerConnection 'https://github.com/linkedin/dexmaker.git'
     92                     }
     93                     licenses {
     94                         license {
     95                             name 'The Apache Software License, Version 2.0'
     96                             url 'http://www.apache.org/license/LICENSE-2.0.txt'
     97                             distribution 'repo'
     98                         }
     99                     }
    100 
    101                     developers {
    102                         developer {
    103                             id 'com.linkedin'
    104                             name 'LinkedIn Corp'
    105                             email ''
    106                         }
    107                     }
    108                 }
    109             }
    110         }
    111     }
    112 }
    113 
    114 repositories {
    115     jcenter()
    116     google()
    117 }
    118 
    119 dependencies {
    120     implementation project(':dexmaker-mockito-inline')
    121 
    122     implementation 'org.mockito:mockito-core:2.21.0', { exclude group: 'net.bytebuddy' }
    123 }
    124