Skip to content

Instantly share code, notes, and snippets.

@omayib
Created January 9, 2018 18:05
Show Gist options
  • Save omayib/a7d30484acb8519c754e21b7161ec388 to your computer and use it in GitHub Desktop.
Save omayib/a7d30484acb8519c754e21b7161ec388 to your computer and use it in GitHub Desktop.
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'
publishing {
publications {
library(MavenPublication) {
// Don't forget to change these
groupId 'com.hepicar'
artifactId 'sdk'
version '0.0.1'
artifact(bundleRelease)
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.compile.allDependencies.each {
if(it.group != null && (it.name != null || "unspecified".equals(it.name)) && it.version != null) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
android {
compileSdkVersion 26
defaultConfig {
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
sourceSets {
test.java.srcDirs += 'src/kotlinTest'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions{
unitTests.returnDefaultValues = true
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
api 'com.github.kittinunf.fuel:fuel-android:1.12.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'org.greenrobot:eventbus:3.1.1'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation "org.robolectric:robolectric:3.6.1"
}
repositories {
mavenCentral()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment