Last active
May 29, 2020 05:44
-
-
Save shanmugasanthosh7/c0b9c904f69a4e147b1b86cafe0e86cf to your computer and use it in GitHub Desktop.
Library module gradle file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'com.jfrog.bintray' | |
apply plugin: 'maven-publish' | |
publishing { | |
publications { | |
Production(MavenPublication) { | |
artifact("$buildDir/outputs/aar/droidils-release.aar") | |
groupId 'com.aptus' | |
artifactId 'droidils' | |
version '1.2.0' | |
//The publication doesn't know about our dependencies, so we have to manually add them to the pom | |
pom.withXml { | |
//def dependenciesNode = asNode().appendNode('dependencies') | |
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each | |
configurations.compile.allDependencies.each { | |
if (it.name != 'unspecified') { | |
def dependencyNode = dependenciesNode.appendNode('dependency') | |
dependencyNode.appendNode('groupId', it.group) | |
dependencyNode.appendNode('artifactId', it.name) | |
dependencyNode.appendNode('version', it.version) | |
} | |
} | |
} | |
} | |
/*Sandbox(MavenPublication) { | |
artifact("$buildDir/outputs/aar/droidils-development-release.aar") | |
groupId 'com.aptus' | |
artifactId 'droidils' | |
version '1.0.3-SANDBOX' | |
//The publication doesn't know about our dependencies, so we have to manually add them to the pom | |
pom.withXml { | |
def dependenciesNode = asNode().appendNode('dependencies') | |
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each | |
configurations.compile.allDependencies.each { | |
def dependencyNode = dependenciesNode.appendNode('dependency') | |
dependencyNode.appendNode('groupId', it.group) | |
dependencyNode.appendNode('artifactId', it.name) | |
dependencyNode.appendNode('version', it.version) | |
} | |
} | |
}*/ | |
} | |
} | |
bintray { | |
// Get Bintray credential from environment variable | |
user = System.getenv('BINTRAY_USER') // Get bintray User | |
key = System.getenv('BINTRAY_API_KEY') // Get bintray Secret Key | |
//configurations = ['archives'] | |
dryRun = false | |
override = false | |
publish = true | |
pkg { | |
repo = 'Droidils' | |
name = project.name | |
userOrg = 'shanmugasanthosh' | |
licenses = ['Apache-2.0'] | |
desc = 'Android Simple View and Utils' | |
websiteUrl = "https://shanmugasanthosh7.github.io/Droidils" | |
issueTrackerUrl = 'https://github.com/shanmugasanthosh7/Droidils/issues' | |
vcsUrl = 'https://github.com/shanmugasanthosh7/Droidils.git' | |
version { | |
name = '1.4.1' //Bintray logical version name | |
vcsTag = '1.4.1' | |
} | |
} | |
publications = ['Production'] | |
} | |
android { | |
compileSdkVersion 29 | |
defaultConfig { | |
minSdkVersion 19 | |
targetSdkVersion 29 | |
versionCode 1 | |
versionName "1.0" | |
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
} | |
tasks.withType(Javadoc).all { | |
enabled = false | |
} | |
dependencies { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
implementation 'androidx.appcompat:appcompat:1.1.0' | |
testImplementation 'junit:junit:4.13' | |
androidTestImplementation 'androidx.test.ext:junit:1.1.1' | |
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | |
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | |
implementation 'androidx.recyclerview:recyclerview:1.1.0' | |
implementation 'com.google.code.gson:gson:2.8.6' | |
} | |
repositories { | |
mavenCentral() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment