Skip to content

Commit

Permalink
Bintray maven setup. Version 0.0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattec92 committed Sep 18, 2016
1 parent c16a791 commit b84adb3
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 2 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
93 changes: 91 additions & 2 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'

ext {
bintrayRepo = 'maven'
bintrayName = 'OnboardingLayout'

publishedGroupId = 'se.mattec'
libraryName = 'OnboardingLayout'
artifact = 'onboardinglayout'

libraryDescription = 'An Android library for creating custom onboarding overlays.'

siteUrl = 'https://github.com/mattec92/OnboardingLayout'
gitUrl = 'https://github.com/mattec92/OnboardingLayout.git'

libraryVersionCode = 1
libraryVersionName = '0.0.1'

developerId = 'mattec92'
developerName = 'Mattias Cederlund'
developerEmail = '[email protected]'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}

android {
compileSdkVersion 24
Expand All @@ -7,8 +34,9 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 24
versionCode 1
versionName "1.0"
versionCode libraryVersionCode
versionName libraryVersionName
project.archivesBaseName = artifact
}
buildTypes {
release {
Expand All @@ -23,3 +51,64 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.0'
}

version = libraryVersionName
group = publishedGroupId

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
version {
name = libraryVersionName
released = new Date()
vcsTag = libraryVersionName
}
}
}

install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

name libraryName
description libraryDescription
url siteUrl

licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl

}
}
}
}
}

0 comments on commit b84adb3

Please sign in to comment.