apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray' def siteUrl = 'https://github.com/gotev/android-upload-service' def gitUrl = 'https://github.com/gotev/android-upload-service.git' def projectName = "android-upload-service" def projectDesc = "Easily upload files in the background with automatic Android Notification Center progress indication." def projectGroup = "net.gotev" group = projectGroup version = "3.4.2" def sdkVersion = 27 android { compileSdkVersion sdkVersion defaultConfig { minSdkVersion 14 targetSdkVersion 22 versionCode 30 versionName version } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } lintOptions { warning 'InvalidPackage' } } def supportLibraryVersion = "27.1.1" dependencies { implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' } // add the following information to the file: local.properties situated in the parent directory of // where this file is: // // bintray.user=gotev // bintray.apikey=api key got from the bintray profile // // be sure to add local.properties to the .gitignore! Properties properties = new Properties() if (project.rootProject.file("local.properties").exists()) { properties.load(project.rootProject.file('local.properties').newDataInputStream()) } install { repositories.mavenInstaller { pom.project { name projectName description projectDesc packaging 'aar' groupId projectGroup version version url siteUrl licenses { license { name 'The Apache Software License, Version 2.0' url 'http://www.apache.org/licenses/LICENSE-2.0.txt' } } developers { developer { id 'gotev' name 'Aleksandar Gotev' } } scm { connection gitUrl developerConnection gitUrl url siteUrl } } } } bintray { user = properties.getProperty("bintray.user") key = properties.getProperty("bintray.apikey") configurations = ['archives'] pkg { repo = "maven" name = projectName desc = projectDesc websiteUrl = siteUrl vcsUrl = gitUrl issueTrackerUrl = siteUrl + "/issues/" licenses = ["Apache-2.0"] labels = ['android', 'upload', 'service', 'library', 'background', 'notification'] publicDownloadNumbers = true publish = true } } task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } task javadoc(type: Javadoc) { title = "Android Upload Service $project.version API" description "Generates Javadoc" source = android.sourceSets.main.java.srcDirs classpath += files(android.bootClasspath) exclude '**/BuildConfig.java', '**/R.java' options { windowTitle("Android Upload Service $project.version Reference") locale = 'en_US' encoding = 'UTF-8' charSet = 'UTF-8' links("http://docs.oracle.com/javase/7/docs/api/"); linksOffline("http://d.android.com/reference", "${android.sdkDirectory}/docs/reference"); setMemberLevel(JavadocMemberLevel.PUBLIC) } } task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } artifacts { archives javadocJar archives sourcesJar }