2015-01-01 11:38:34 +01:00
|
|
|
/*
|
2017-02-09 15:20:33 +01:00
|
|
|
* Twidere - Twitter client for Android
|
2015-01-01 11:38:34 +01:00
|
|
|
*
|
2017-02-09 15:20:33 +01:00
|
|
|
* 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
|
2015-01-01 11:38:34 +01:00
|
|
|
*
|
2017-02-09 15:20:33 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2015-01-01 11:38:34 +01:00
|
|
|
*
|
2017-02-09 15:20:33 +01:00
|
|
|
* 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.
|
2015-01-01 11:38:34 +01:00
|
|
|
*/
|
|
|
|
|
2015-01-11 10:28:45 +01:00
|
|
|
apply plugin: 'com.android.library'
|
2017-06-09 17:09:04 +02:00
|
|
|
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 {
|
2020-05-31 03:12:53 +02:00
|
|
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
|
|
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
|
2017-06-09 17:09:04 +02:00
|
|
|
}
|
|
|
|
}
|
2015-01-01 11:38:34 +01:00
|
|
|
|
2020-04-21 17:37:51 +02:00
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
jcenter()
|
|
|
|
}
|
2017-09-05 11:00:01 +02:00
|
|
|
|
2020-04-21 17:37:51 +02:00
|
|
|
android {
|
2017-09-05 11:00:01 +02:00
|
|
|
compileSdkVersion globalCompileSdkVersion
|
|
|
|
buildToolsVersion globalBuildToolsVersion
|
|
|
|
|
2015-01-11 10:28:45 +01:00
|
|
|
defaultConfig {
|
2020-01-26 08:35:15 +01:00
|
|
|
minSdkVersion globalMinSdkVersion
|
|
|
|
targetSdkVersion globalTargetSdkVersion
|
2017-06-09 17:09:04 +02:00
|
|
|
versionCode projectVersionCode
|
|
|
|
versionName projectVersionName
|
2015-01-01 11:38:34 +01:00
|
|
|
}
|
2020-05-31 03:12:29 +02:00
|
|
|
|
2015-01-11 10:28:45 +01:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
2015-01-01 11:38:34 +01:00
|
|
|
}
|
2020-05-31 03:12:29 +02:00
|
|
|
|
|
|
|
compileOptions {
|
2020-05-31 06:32:22 +02:00
|
|
|
encoding = 'UTF-8'
|
2020-05-31 03:12:29 +02:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2015-01-11 10:28:45 +01:00
|
|
|
}
|
2015-01-01 11:38:34 +01:00
|
|
|
|
2015-01-11 10:28:45 +01:00
|
|
|
dependencies {
|
2020-04-21 17:37:51 +02:00
|
|
|
/** Android support **/
|
2020-01-26 08:35:15 +01:00
|
|
|
implementation 'androidx.annotation:annotation:1.1.0'
|
2020-04-21 17:37:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
/** Third-party dependencies **/
|
2020-05-31 03:12:29 +02:00
|
|
|
implementation "com.bluelinelabs:logansquare:${sharedVersions['LoganSquare']}"
|
|
|
|
annotationProcessor "com.bluelinelabs:logansquare-compiler:${sharedVersions['LoganSquare']}"
|
|
|
|
implementation "com.fasterxml.jackson.core:jackson-core:${sharedVersions['Jackson']}"
|
|
|
|
implementation "com.hannesdorfmann.parcelableplease:annotation:${sharedVersions['ParcelablePlease']}"
|
|
|
|
annotationProcessor "com.hannesdorfmann.parcelableplease:processor:${sharedVersions['ParcelablePlease']}"
|
2020-04-21 17:37:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
/** Custom dependencies **/
|
2020-05-31 03:12:29 +02:00
|
|
|
implementation "com.github.mariotaku.ExportablePreferences:core:${sharedVersions['ExportablePreferences']}"
|
|
|
|
annotationProcessor "com.github.mariotaku.ExportablePreferences:processor:${sharedVersions['ExportablePreferences']}"
|
|
|
|
implementation "com.github.mariotaku.CommonsLibrary:logansquare:${sharedVersions['MariotakuCommons']}"
|
|
|
|
implementation "com.github.mariotaku.CommonsLibrary:objectcursor:${sharedVersions['MariotakuCommons']}"
|
|
|
|
implementation "com.github.mariotaku.ObjectCursor:core:${sharedVersions['ObjectCursor']}"
|
|
|
|
annotationProcessor "com.github.mariotaku.ObjectCursor:processor:${sharedVersions['ObjectCursor']}"
|
|
|
|
implementation "com.github.mariotaku.RestFu:library:${sharedVersions['RestFu']}"
|
|
|
|
implementation "com.github.mariotaku.RestFu:oauth:${sharedVersions['RestFu']}"
|
|
|
|
implementation "com.github.mariotaku.RestFu:oauth2:${sharedVersions['RestFu']}"
|
2015-01-01 11:38:34 +01:00
|
|
|
}
|
2017-06-09 17:09:04 +02:00
|
|
|
|
|
|
|
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 {
|
2017-07-16 14:22:07 +02:00
|
|
|
def propsFile = rootProject.file('private/bintray.properties')
|
|
|
|
if (propsFile.exists()) {
|
|
|
|
def properties = new Properties()
|
|
|
|
properties.load(propsFile.newDataInputStream())
|
|
|
|
user = properties.getProperty('user')
|
|
|
|
key = properties.getProperty('key')
|
|
|
|
}
|
2017-06-09 17:09:04 +02:00
|
|
|
|
|
|
|
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'
|
|
|
|
}
|