apply plugin: 'com.android.library' apply plugin: 'com.jfrog.artifactory' apply plugin: 'maven-publish' def libraryGroupId = 'hr.tacitus.graphs' def libraryArtifactId = 'android-graphs' def libraryVersion = '0.0.8' android { compileSdkVersion 25 buildToolsVersion "25.0.3" defaultConfig { minSdkVersion 19 targetSdkVersion 25 versionCode 1 versionName libraryVersion testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.+' testCompile 'junit:junit:4.12' } publishing { publications { aar(MavenPublication) { groupId libraryGroupId version libraryVersion artifactId libraryArtifactId artifact("$buildDir/outputs/aar/app-release.aar") } } } artifactory { contextUrl = 'http://knut-hetzner.ddns.net:8081/artifactory' publish { repository { repoKey = 'libs-release-local' username = artifactory_username password = artifactory_password } defaults { publications('aar') publishArtifacts = true properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core'] publishPom = true } } }