2018-05-14 15:20:36 +00:00
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
apply plugin: 'kotlin-android'
|
2018-05-30 20:38:45 +00:00
|
|
|
apply plugin: 'com.jfrog.bintray'
|
|
|
|
// Simply applying this plugin gets bintray to publish a pom file.
|
|
|
|
apply plugin: 'com.github.dcendents.android-maven'
|
2018-05-14 15:20:36 +00:00
|
|
|
|
|
|
|
android {
|
2018-06-01 19:44:31 +00:00
|
|
|
compileSdkVersion rootProject.ext.build['compileSdkVersion']
|
2018-05-14 15:20:36 +00:00
|
|
|
defaultConfig {
|
2018-06-01 19:44:31 +00:00
|
|
|
minSdkVersion rootProject.ext.build['minSdkVersion']
|
|
|
|
targetSdkVersion rootProject.ext.build['targetSdkVersion']
|
|
|
|
|
2018-05-14 15:20:36 +00:00
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
2018-06-25 10:20:36 +00:00
|
|
|
|
|
|
|
versionCode 0
|
|
|
|
versionName "0.1"
|
2018-05-14 15:20:36 +00:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
androidTest.assets.srcDirs += '../../../../fixtures'
|
|
|
|
}
|
2018-05-29 17:16:32 +00:00
|
|
|
|
|
|
|
// TODO silences:
|
|
|
|
// [InvalidPackage]: not included in Android: java.awt. Referenced from com.sun.jna.Native.AWT.
|
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
}
|
2018-05-14 15:20:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
})
|
2018-05-29 17:16:32 +00:00
|
|
|
androidTestImplementation 'com.android.support:support-annotations:27.1.1'
|
|
|
|
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
|
|
|
androidTestImplementation 'com.android.support.test:rules:1.0.2'
|
|
|
|
implementation 'com.android.support:appcompat-v7:27.1.1'
|
|
|
|
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
|
|
|
|
implementation 'com.android.support:design:27.1.1'
|
2018-05-14 15:20:36 +00:00
|
|
|
testImplementation 'junit:junit:4.12'
|
2018-05-29 17:16:32 +00:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
2018-05-14 15:20:36 +00:00
|
|
|
implementation 'net.java.dev.jna:jna:4.5.1'
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
2018-05-30 20:38:45 +00:00
|
|
|
|
|
|
|
// Publishing to jcenter/bintray.
|
|
|
|
def libGroupId = properties.libGroupId
|
|
|
|
def libRepoName = properties.libRepositoryName
|
|
|
|
def libProjectName = properties.libProjectName
|
|
|
|
def libProjectDescription = properties.libProjectDescription
|
|
|
|
def libUrl = properties.libUrl
|
|
|
|
def libVcsUrl = properties.libVcsUrl
|
|
|
|
def libLicense = properties.libLicense
|
|
|
|
|
|
|
|
Properties localProperties = null
|
|
|
|
if (project.rootProject.file('local.properties').canRead()) {
|
|
|
|
localProperties = new Properties()
|
|
|
|
localProperties.load(project.rootProject.file('local.properties').newDataInputStream())
|
|
|
|
}
|
|
|
|
|
|
|
|
version = rootProject.ext.library['version']
|
|
|
|
|
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
from android.sourceSets.main.java.srcDirs
|
|
|
|
classifier = 'sources'
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives sourcesJar
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
group = libGroupId
|
|
|
|
archivesBaseName = libProjectName
|
|
|
|
|
|
|
|
bintray {
|
|
|
|
user = localProperties != null ? localProperties.getProperty("bintray.user") : ""
|
|
|
|
key = localProperties != null ? localProperties.getProperty("bintray.apikey") : ""
|
|
|
|
|
|
|
|
configurations = ['archives']
|
|
|
|
pkg {
|
|
|
|
repo = libRepoName
|
|
|
|
name = libProjectName
|
|
|
|
userOrg = "grisha" // Temporary org name until package is on jcenter. Issue #725.
|
|
|
|
desc = libProjectDescription
|
|
|
|
websiteUrl = libUrl
|
|
|
|
vcsUrl = libVcsUrl
|
|
|
|
licenses = [libLicense]
|
|
|
|
publish = true
|
|
|
|
publicDownloadNumbers = true
|
|
|
|
}
|
|
|
|
}
|