buildscript {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
    }
}

wrapper {
    gradleVersion = '5.6'
}

apply plugin: 'com.android.library'


android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
        }
    }
      lintOptions {
          abortOnError false
      }

}

dependencies {
    implementation 'androidx.core:core:1.0.0-beta01'
}


//this is used to generate .jar files and push to maven repo
// This is the actual solution, as in http://stackoverflow.com/a/19037807/1002054
task deleteJar(type: Delete) {
    delete 'libs/jars/graphViewM.jar'
}

task createJar(type: Copy) {
    //from('build/intermediates/bundles/release/')
    from('build/intermediates/packaged-classes/release/')
    //from('build/intermediates/aar_main_jar/release/')
    into('libs/jars/')
    include('classes.jar')
    rename('classes.jar', 'graphViewM.jar')
}

createJar.dependsOn(deleteJar, build)


apply from: './maven_push.gradle'

repositories {
    google()
    mavenCentral()
    jcenter()
}