145 lines
4.6 KiB
Groovy
145 lines
4.6 KiB
Groovy
/*
|
|
* Twidere - Twitter client for Android
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* distributed with this work for additional information
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
* to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
* KIND, either express or implied. See the License for the
|
|
* specific language governing permissions and limitations
|
|
* under the License.
|
|
*/
|
|
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'com.neenbedankt.android-apt'
|
|
apply plugin: 'com.jfrog.bintray'
|
|
apply plugin: 'com.github.dcendents.android-maven'
|
|
|
|
group = projectGroupId
|
|
version = projectVersionName
|
|
archivesBaseName = 'common-component'
|
|
|
|
ext {
|
|
projectDescription = 'Common commonent library for Twidere app'
|
|
projectUrl = 'https://github.com/TwidereProject/Twidere-Android'
|
|
projectVcsUrl = 'https://github.com/TwidereProject/Twidere-Android.git'
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
|
}
|
|
}
|
|
|
|
android {
|
|
defaultConfig {
|
|
minSdkVersion 14
|
|
targetSdkVersion 25
|
|
versionCode projectVersionCode
|
|
versionName projectVersionName
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
apt "com.bluelinelabs:logansquare-compiler:${libVersions['LoganSquare']}"
|
|
apt 'com.hannesdorfmann.parcelableplease:processor:1.0.2'
|
|
apt "com.github.mariotaku.ObjectCursor:processor:${libVersions['ObjectCursor']}"
|
|
apt "com.github.mariotaku.ExportablePreferences:processor:${libVersions['ExportablePreferences']}"
|
|
compile "com.android.support:support-annotations:${libVersions['SupportLib']}"
|
|
compile "com.bluelinelabs:logansquare:${libVersions['LoganSquare']}"
|
|
compile "com.github.mariotaku.RestFu:library:${libVersions['RestFu']}"
|
|
compile "com.github.mariotaku.RestFu:oauth:${libVersions['RestFu']}"
|
|
compile "com.github.mariotaku.RestFu:oauth2:${libVersions['RestFu']}"
|
|
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2'
|
|
compile "com.github.mariotaku.ObjectCursor:core:${libVersions['ObjectCursor']}"
|
|
compile "com.github.mariotaku.ExportablePreferences:core:${libVersions['ExportablePreferences']}"
|
|
compile "com.github.mariotaku.CommonsLibrary:objectcursor:${libVersions['MariotakuCommons']}"
|
|
compile "com.github.mariotaku.CommonsLibrary:logansquare:${libVersions['MariotakuCommons']}"
|
|
}
|
|
|
|
install {
|
|
repositories.mavenInstaller {
|
|
pom.project {
|
|
name archivesBaseName
|
|
description projectDescription
|
|
url projectUrl
|
|
inceptionYear '2012'
|
|
|
|
packaging 'aar'
|
|
groupId projectGroupId
|
|
artifactId archivesBaseName
|
|
version projectVersionName
|
|
|
|
licenses {
|
|
license {
|
|
name 'The Apache Software License, Version 2.0'
|
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
distribution 'repo'
|
|
}
|
|
}
|
|
scm {
|
|
connection projectVcsUrl
|
|
url projectUrl
|
|
|
|
}
|
|
developers {
|
|
developer {
|
|
name 'Mariotaku Lee'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
bintray {
|
|
def properties = new Properties()
|
|
properties.load(rootProject.file('private/bintray.properties').newDataInputStream())
|
|
user = properties.getProperty('user')
|
|
key = properties.getProperty('key')
|
|
|
|
pkg {
|
|
name = archivesBaseName
|
|
description = projectDescription
|
|
repo = 'android'
|
|
userOrg = 'twidere'
|
|
vcsUrl = projectVcsUrl
|
|
licenses = ['Apache-2.0']
|
|
publish = true
|
|
|
|
version {
|
|
name = projectVersionName
|
|
vcsTag = projectVersionName
|
|
}
|
|
}
|
|
|
|
configurations = ['archives']
|
|
}
|
|
|
|
// https://github.com/JFrogDev/build-info/issues/92
|
|
afterEvaluate {
|
|
bintrayUpload.dependsOn 'install'
|
|
} |