From 93141b614e617d9310572ed0c21431a1b181b262 Mon Sep 17 00:00:00 2001 From: Fobid Date: Thu, 17 Nov 2016 22:54:59 +0900 Subject: [PATCH] Added bin tray script --- .../animated_vector_drawable_24_2_1.xml | 4 +- .idea/libraries/appcompat_v7_24_2_1.xml | 4 +- .idea/libraries/espresso_core_2_2_2.xml | 6 +- .../espresso_idling_resource_2_2_2.xml | 4 +- ...xposed_instrumentation_api_publish_0_5.xml | 6 +- .idea/libraries/javax_inject_1.xml | 4 +- .idea/libraries/recyclerview_v7_24_2_1.xml | 2 +- .idea/libraries/rules_0_5.xml | 6 +- .idea/libraries/runner_0_5.xml | 6 +- .../libraries/support_annotations_24_2_1.xml | 4 +- .idea/libraries/support_compat_24_2_1.xml | 8 +- .idea/libraries/support_core_ui_24_2_1.xml | 8 +- .idea/libraries/support_core_utils_24_2_1.xml | 6 +- .idea/libraries/support_fragment_24_2_1.xml | 6 +- .../libraries/support_media_compat_24_2_1.xml | 6 +- .idea/libraries/support_v4_24_2_1.xml | 2 +- .../support_vector_drawable_24_2_1.xml | 6 +- .idea/modules.xml | 3 + build.gradle | 4 + gradlew | 0 linkable-text/build.gradle | 103 +++++++++++++++++- sample/build.gradle | 4 +- 22 files changed, 153 insertions(+), 49 deletions(-) mode change 100644 => 100755 gradlew diff --git a/.idea/libraries/animated_vector_drawable_24_2_1.xml b/.idea/libraries/animated_vector_drawable_24_2_1.xml index eac1ff8..e3b8a05 100644 --- a/.idea/libraries/animated_vector_drawable_24_2_1.xml +++ b/.idea/libraries/animated_vector_drawable_24_2_1.xml @@ -6,8 +6,8 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/appcompat_v7_24_2_1.xml b/.idea/libraries/appcompat_v7_24_2_1.xml index 7d49a10..f1937c3 100644 --- a/.idea/libraries/appcompat_v7_24_2_1.xml +++ b/.idea/libraries/appcompat_v7_24_2_1.xml @@ -10,8 +10,8 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/espresso_core_2_2_2.xml b/.idea/libraries/espresso_core_2_2_2.xml index 459019d..3d8578a 100644 --- a/.idea/libraries/espresso_core_2_2_2.xml +++ b/.idea/libraries/espresso_core_2_2_2.xml @@ -1,13 +1,13 @@ - + - - + + \ No newline at end of file diff --git a/.idea/libraries/espresso_idling_resource_2_2_2.xml b/.idea/libraries/espresso_idling_resource_2_2_2.xml index f5feea0..52d01d4 100644 --- a/.idea/libraries/espresso_idling_resource_2_2_2.xml +++ b/.idea/libraries/espresso_idling_resource_2_2_2.xml @@ -6,8 +6,8 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml b/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml index 5fb1a64..6aa1cbd 100644 --- a/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml +++ b/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml @@ -1,13 +1,13 @@ - + - - + + \ No newline at end of file diff --git a/.idea/libraries/javax_inject_1.xml b/.idea/libraries/javax_inject_1.xml index eebeedd..0d1d5fc 100644 --- a/.idea/libraries/javax_inject_1.xml +++ b/.idea/libraries/javax_inject_1.xml @@ -4,8 +4,6 @@ - - - + \ No newline at end of file diff --git a/.idea/libraries/recyclerview_v7_24_2_1.xml b/.idea/libraries/recyclerview_v7_24_2_1.xml index 1d8d78d..c16c84c 100644 --- a/.idea/libraries/recyclerview_v7_24_2_1.xml +++ b/.idea/libraries/recyclerview_v7_24_2_1.xml @@ -9,7 +9,7 @@ - + \ No newline at end of file diff --git a/.idea/libraries/rules_0_5.xml b/.idea/libraries/rules_0_5.xml index d506e63..2e58dc9 100644 --- a/.idea/libraries/rules_0_5.xml +++ b/.idea/libraries/rules_0_5.xml @@ -5,13 +5,13 @@ - + - - + + \ No newline at end of file diff --git a/.idea/libraries/runner_0_5.xml b/.idea/libraries/runner_0_5.xml index 6fb66b6..9a14fe5 100644 --- a/.idea/libraries/runner_0_5.xml +++ b/.idea/libraries/runner_0_5.xml @@ -5,13 +5,13 @@ - + - - + + \ No newline at end of file diff --git a/.idea/libraries/support_annotations_24_2_1.xml b/.idea/libraries/support_annotations_24_2_1.xml index 8bf6b6a..b12b1b8 100644 --- a/.idea/libraries/support_annotations_24_2_1.xml +++ b/.idea/libraries/support_annotations_24_2_1.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/support_compat_24_2_1.xml b/.idea/libraries/support_compat_24_2_1.xml index f0dec67..6f388ec 100644 --- a/.idea/libraries/support_compat_24_2_1.xml +++ b/.idea/libraries/support_compat_24_2_1.xml @@ -5,14 +5,14 @@ - - + + - - + + \ No newline at end of file diff --git a/.idea/libraries/support_core_ui_24_2_1.xml b/.idea/libraries/support_core_ui_24_2_1.xml index 927896c..01f3ed8 100644 --- a/.idea/libraries/support_core_ui_24_2_1.xml +++ b/.idea/libraries/support_core_ui_24_2_1.xml @@ -5,14 +5,14 @@ - - + + - - + + \ No newline at end of file diff --git a/.idea/libraries/support_core_utils_24_2_1.xml b/.idea/libraries/support_core_utils_24_2_1.xml index 08c6e49..f8110c4 100644 --- a/.idea/libraries/support_core_utils_24_2_1.xml +++ b/.idea/libraries/support_core_utils_24_2_1.xml @@ -1,14 +1,14 @@ + - - - + + \ No newline at end of file diff --git a/.idea/libraries/support_fragment_24_2_1.xml b/.idea/libraries/support_fragment_24_2_1.xml index 584ed3f..a01ecde 100644 --- a/.idea/libraries/support_fragment_24_2_1.xml +++ b/.idea/libraries/support_fragment_24_2_1.xml @@ -5,14 +5,14 @@ + - - - + + \ No newline at end of file diff --git a/.idea/libraries/support_media_compat_24_2_1.xml b/.idea/libraries/support_media_compat_24_2_1.xml index 3fa69b5..7428e07 100644 --- a/.idea/libraries/support_media_compat_24_2_1.xml +++ b/.idea/libraries/support_media_compat_24_2_1.xml @@ -5,14 +5,14 @@ - + - - + + \ No newline at end of file diff --git a/.idea/libraries/support_v4_24_2_1.xml b/.idea/libraries/support_v4_24_2_1.xml index c487cee..a691c56 100644 --- a/.idea/libraries/support_v4_24_2_1.xml +++ b/.idea/libraries/support_v4_24_2_1.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/support_vector_drawable_24_2_1.xml b/.idea/libraries/support_vector_drawable_24_2_1.xml index fba6727..c0ab79e 100644 --- a/.idea/libraries/support_vector_drawable_24_2_1.xml +++ b/.idea/libraries/support_vector_drawable_24_2_1.xml @@ -1,13 +1,13 @@ - + - - + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 31b349d..fba9c40 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,8 +3,11 @@ + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index c20bca1..f2f3771 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,8 @@ buildscript { // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } } @@ -21,3 +23,5 @@ allprojects { task clean(type: Delete) { delete rootProject.buildDir } + +ext.supportLibVersion = '24.2.1' diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/linkable-text/build.gradle b/linkable-text/build.gradle index 8ed8f56..d2db0ff 100644 --- a/linkable-text/build.gradle +++ b/linkable-text/build.gradle @@ -1,4 +1,13 @@ apply plugin: 'com.android.library' +apply plugin: 'com.jfrog.bintray' +apply plugin: 'com.github.dcendents.android-maven' +apply plugin: 'signing' + +version = '0.1.0' + +def siteUrl = 'https://github.com/fobid/linkable-text-android' // Homepage URL of the library +def gitUrl = 'https://github.com/fobid/linkable-text-android.git' // Git repository URL +group = "com.github.fobid" // Maven Group ID for the artifact android { compileSdkVersion 24 @@ -8,7 +17,7 @@ android { minSdkVersion 9 targetSdkVersion 24 versionCode 1 - versionName "1.0" + versionName version testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -21,11 +30,101 @@ android { } } +install { + repositories.mavenInstaller { + // This generates POM.xml with proper parameters + pom { + project { + packaging 'aar' + + // Add your description here + name 'linkable-text' + description = 'Clickable @mentions, #hashtags and links' + url siteUrl + + // Set your license + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id 'fobid' + name 'fobid' + email 'fobidbumz@gmail.com' + } + } + scm { + connection gitUrl + developerConnection gitUrl + url siteUrl + } + } + } + } +} + +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +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 +} +artifacts { + archives javadocJar + archives sourcesJar +} + +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +// https://github.com/bintray/gradle-bintray-plugin +bintray { + user = properties.getProperty("bintray.user") + key = properties.getProperty("bintray.apikey") + + configurations = ['archives'] + pkg { + repo = "maven" + name = "linkable-text" + websiteUrl = siteUrl + vcsUrl = gitUrl + licenses = ["Apache-2.0"] + publish = true + + githubRepo = 'fobid/linkable-text-android' + githubReleaseNotesFile = 'CHANGELOG.md' + + version { + 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' + } +// mavenCentralSync { +// sync = true //Optional (true by default). Determines whether to sync the version to Maven Central. +// user = properties.getProperty("bintray.oss.user") //OSS user token +// password = properties.getProperty("bintray.oss.password") //OSS user password +// 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. +// } + } + } +} + dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:24.2.1' + compile "com.android.support:appcompat-v7:${supportLibVersion}" testCompile 'junit:junit:4.12' } diff --git a/sample/build.gradle b/sample/build.gradle index 5b7f4e1..54fccaa 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -24,8 +24,8 @@ dependencies { androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:24.2.1' - compile 'com.android.support:recyclerview-v7:24.2.1' + compile "com.android.support:appcompat-v7:${supportLibVersion}" + compile "com.android.support:recyclerview-v7:${supportLibVersion}" testCompile 'junit:junit:4.12' compile project(':linkable-text') }