You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
150 lines
5.1 KiB
150 lines
5.1 KiB
/*
|
|
* *************************************************************************
|
|
* build.gradle.java
|
|
* **************************************************************************
|
|
* Copyright © 2015 VLC authors and VideoLAN
|
|
* Author: Geoffrey Métais
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
|
* ***************************************************************************
|
|
*/
|
|
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'com.github.dcendents.android-maven'
|
|
apply plugin: 'com.jfrog.bintray'
|
|
|
|
android {
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
|
|
defaultConfig {
|
|
versionCode 1
|
|
versionName "1.0"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
}
|
|
|
|
task generateSources (type: Jar) {
|
|
classifier = 'sources'
|
|
from android.sourceSets.main.java.srcDirs
|
|
}
|
|
|
|
task javadoc(type: Javadoc) {
|
|
source = android.sourceSets.main.java.srcDirs
|
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
api "androidx.appcompat:appcompat:$rootProject.ext.androidxVersion"
|
|
testImplementation "junit:junit:$rootProject.ext.junitVersion"
|
|
}
|
|
|
|
def properties = new Properties()
|
|
properties.load( new FileInputStream("local.properties"))
|
|
group = properties.getProperty("package.groupId")
|
|
version = properties.getProperty("version.name")
|
|
|
|
install {
|
|
repositories.mavenInstaller {
|
|
pom {
|
|
project {
|
|
packaging 'aar'
|
|
groupId properties.getProperty("package.groupId")
|
|
artifactId properties.getProperty("package.name")
|
|
|
|
name properties.getProperty("package.name")
|
|
description properties.getProperty("package.description")
|
|
url properties.getProperty("package.url")
|
|
|
|
licenses {
|
|
license {
|
|
name properties.getProperty("license.name")
|
|
url properties.getProperty("license.url")
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id properties.getProperty("developer.id")
|
|
name properties.getProperty("developer.name")
|
|
email properties.getProperty("developer.email")
|
|
}
|
|
}
|
|
scm {
|
|
connection properties.getProperty("vcs.connection")
|
|
developerConnection properties.getProperty("vcs.connection")
|
|
url properties.getProperty("vcs.url")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
artifacts {
|
|
archives javadocJar
|
|
archives generateSources
|
|
}
|
|
|
|
bintray {
|
|
user = properties.getProperty("bintray.user")
|
|
key = properties.getProperty("bintray.apikey")
|
|
|
|
configurations = ['archives']
|
|
|
|
pkg {
|
|
repo = properties.getProperty("package.repository")
|
|
name = properties.getProperty("package.name")
|
|
//userOrg = properties.getProperty("package.groupId")
|
|
desc = properties.getProperty("package.description")
|
|
websiteUrl = properties.getProperty("package.url")
|
|
vcsUrl = properties.getProperty("vcs.url")
|
|
licenses = [properties.getProperty("package.licenses")]
|
|
publish = true
|
|
publicDownloadNumbers = true
|
|
version {
|
|
name = properties.getProperty("version.name")
|
|
desc = properties.getProperty("version.description")
|
|
released = new Date()
|
|
vcsTag = properties.getProperty("vcs.tag")
|
|
//gpg {
|
|
// sign = true
|
|
// passphrase = properties.getProperty("bintray.gpg.password")
|
|
//}
|
|
//mavenCentralSync {
|
|
// sync = true
|
|
// user = properties.getProperty("bintray.user") //OSS user token: mandatory
|
|
// password = properties.getProperty("bintray.password") //OSS user password: mandatory
|
|
// close = '1'
|
|
//}
|
|
}
|
|
}
|
|
}
|
|
|
|
// launch uploadApi to upload extension api on bintray based on values in local.properties
|
|
task uploadApi {
|
|
dependsOn 'install'
|
|
dependsOn 'bintrayUpload'
|
|
tasks.findByName('bintrayUpload').mustRunAfter 'install'
|
|
}
|