forked from NordicSemiconductor/Android-BLE-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
150 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,13 @@ | ||
apply plugin: 'com.android.library' | ||
/* | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
ext { | ||
PUBLISH_GROUP_ID = 'no.nordicsemi.android' | ||
PUBLISH_ARTIFACT_ID = 'ble' | ||
PUBLISH_VERSION = '2.1.1' | ||
bintrayRepo = 'android' | ||
bintrayName = 'ble-library' | ||
publishedGroupId = PUBLISH_GROUP_ID | ||
artifact = PUBLISH_ARTIFACT_ID | ||
libraryVersion = PUBLISH_VERSION | ||
libraryName = 'BLE Library' | ||
libraryDescription = 'Bluetooth Low Energy library for Android' | ||
issuesUrl = 'https://github.com/NordicSemiconductor/Android-BLE-Library/issues' | ||
siteUrl = 'https://github.com/NordicSemiconductor/Android-BLE-Library' | ||
gitUrl = 'https://github.com/NordicSemiconductor/Android-BLE-Library.git' | ||
developerId = 'philips77' | ||
developerName = 'Aleksander Nowakowski' | ||
developerEmail = '[email protected]' | ||
licenseName = 'The BSD 3-Clause License' | ||
licenseUrl = 'http://opensource.org/licenses/BSD-3-Clause' | ||
allLicenses = ["BSD 3-Clause"] | ||
} | ||
*/ | ||
android { | ||
compileSdkVersion 29 | ||
|
||
defaultConfig { | ||
minSdkVersion 18 | ||
targetSdkVersion 29 | ||
versionCode 27 | ||
versionName "2.1.1" | ||
versionName VERSION_NAME | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
@@ -64,55 +34,4 @@ dependencies { | |
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
} | ||
|
||
/* | ||
// The following script creates a POM file required to publish on Maven Central | ||
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' | ||
// This script creates sources and javadocs. Both are required to publish a library on jcenter and MC. | ||
apply from: 'https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-aar.gradle' | ||
// The following link publishes the library to jcenter. It does not handle the userOrg, so it has been copied and modified below. | ||
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' | ||
// Copied from https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle | ||
version = libraryVersion | ||
// Bintray | ||
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 | ||
userOrg = properties.getProperty("bintray.userOrg") | ||
desc = libraryDescription | ||
websiteUrl = siteUrl | ||
issueTrackerUrl = issuesUrl | ||
vcsUrl = gitUrl | ||
licenses = allLicenses | ||
publish = true | ||
publicDownloadNumbers = true | ||
version { | ||
desc = libraryDescription | ||
gpg { | ||
sign = true //Determines whether to GPG sign the files. The default is false | ||
passphrase = properties.getProperty("bintray.gpg.password") | ||
//Optional. The passphrase for GPG signing' | ||
} | ||
} | ||
} | ||
} | ||
if (JavaVersion.current().isJava8Compatible()) { | ||
allprojects { | ||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
} | ||
} | ||
} | ||
*/ | ||
apply from: rootProject.file('gradle/gradle-bintray-push.gradle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
POM_ARTIFACT_ID=ble | ||
POM_NAME=Bluetooth Low Energy library for Android | ||
POM_PACKAGING=aar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,23 @@ | |
|
||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx1536m | ||
|
||
android.enableJetifier=true | ||
android.useAndroidX=true | ||
|
||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
android.useAndroidX=true | ||
|
||
VERSION_NAME=2.2.0-alpha01 | ||
GROUP=no.nordicsemi.android | ||
|
||
POM_DESCRIPTION=Bluetooth Low Energy library for Android | ||
POM_URL=https://github.com/NordicSemiconductor/Android-BLE-Library | ||
POM_SCM_URL=https://github.com/NordicSemiconductor/Android-BLE-Library | ||
POM_SCM_CONNECTION=scm:[email protected]:NordicSemiconductor/Android-BLE-Library.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:NordicSemiconductor/Android-BLE-Library.git | ||
POM_LICENCE=BSD 3-Clause | ||
POM_LICENCE_NAME=The BSD 3-Clause License | ||
POM_LICENCE_URL=http://opensource.org/licenses/BSD-3-Clause | ||
POM_DEVELOPER_ID=nordic | ||
POM_DEVELOPER_NAME=Nordic Semiconductor ASA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
version = VERSION_NAME | ||
group = GROUP | ||
|
||
afterEvaluate { project -> | ||
task install(type: Upload) { | ||
repositories.mavenInstaller { | ||
configuration = configurations.archives | ||
|
||
pom.groupId = GROUP | ||
pom.artifactId = POM_ARTIFACT_ID | ||
pom.version = VERSION_NAME | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task javadoc(type: Javadoc) { | ||
failOnError false | ||
source = android.sourceSets.main.java.sourceFiles | ||
|
||
title = POM_DESCRIPTION | ||
|
||
options.links("https://docs.oracle.com/javase/8/docs/api/") | ||
options.linksOffline("https://d.android.com/reference","${android.sdkDirectory}/docs/reference") | ||
|
||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
classpath += configurations.compile | ||
|
||
// We're excluding these generated files | ||
exclude '**/BuildConfig.java' | ||
exclude '**/R.java' | ||
} | ||
|
||
task androidJavadocsJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.source | ||
} | ||
|
||
if (JavaVersion.current().isJava8Compatible()) { | ||
allprojects { | ||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
} | ||
} | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
archives androidJavadocsJar | ||
} | ||
} | ||
|
||
// Bintray | ||
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 { | ||
name = GROUP + ":" + POM_ARTIFACT_ID | ||
desc = POM_DESCRIPTION | ||
|
||
userOrg = properties.getProperty("BINTRAY_USER_ORG") | ||
repo = properties.getProperty("BINTRAY_REPO") | ||
|
||
websiteUrl = POM_URL | ||
issueTrackerUrl = POM_URL + "/issues" | ||
vcsUrl = POM_URL + ".git" | ||
|
||
licenses = [POM_LICENCE] | ||
|
||
publish = true | ||
publicDownloadNumbers = true | ||
|
||
version { | ||
desc = POM_DESCRIPTION | ||
vcsTag = "v" + VERSION_NAME | ||
gpg { | ||
sign = true // Determines whether to GPG sign the files. The default is false | ||
passphrase = properties.getProperty("BINTRAY_GPG_PASSWORD") // Optional. The passphrase for GPG signing' | ||
} | ||
// Optional configuration for Maven Central sync of the version | ||
mavenCentralSync { | ||
sync = true //[Default: true] Determines whether to sync the version to Maven Central. | ||
user = properties.getProperty("SONATYPE_NEXUS_USERNAME") //OSS user token: mandatory | ||
password = properties.getProperty("SONATYPE_NEXUS_PASSWORD") //OSS user password: mandatory | ||
close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually. | ||
} | ||
} | ||
} | ||
} |