File tree Expand file tree Collapse file tree 8 files changed +65
-1
lines changed Expand file tree Collapse file tree 8 files changed +65
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ branches:
25
25
26
26
script : ./gradlew check --stacktrace
27
27
28
+ after_success :
29
+ - " ./deploy_snapshot.sh"
30
+
28
31
deploy :
29
32
provider : script
30
33
script : ./release.sh
Original file line number Diff line number Diff line change @@ -147,6 +147,16 @@ buildscript {
147
147
}
148
148
```
149
149
150
+ Snapshots of the development version are available in [ JFrog's snapshots repository] ( https://oss.jfrog.org/oss-snapshot-local/ ) ).
151
+ Add the repo below to download ` SNAPSHOT ` releases.
152
+
153
+ ``` groovy
154
+ repositories {
155
+ jcenter()
156
+ maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
157
+ }
158
+ ```
159
+
150
160
And on your ** app module** ` build.gradle ` :
151
161
152
162
` ${latest.version} ` is [ ![ Download] ( https://api.bintray.com/packages/hotchemi/maven/permissionsdispatcher/images/download.svg )] ( https://bintray.com/hotchemi/maven/permissionsdispatcher/_latestVersion )
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ buildscript {
8
8
classpath " com.neenbedankt.gradle.plugins:android-apt:$APT_PLUGIN_VERSION "
9
9
classpath " com.novoda:bintray-release:$BINTRAY_PLUGIN_VERSION "
10
10
classpath " com.netflix.nebula:gradle-extra-configurations-plugin:$CONFIG_PLUGIN_VERSION "
11
+ // Need this to publish SNAPSHOTs to JFrog
12
+ classpath " org.jfrog.buildinfo:build-info-extractor-gradle:$JFROG_PLUGIN_VERSION "
11
13
}
12
14
}
13
15
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo.
4
+ #
5
+ # Adapted from https://coderwall.com/p/9b_lfq and
6
+ # http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/
7
+
8
+ SLUG=" hotchemi/PermissionsDispatcher"
9
+ JDK=" oraclejdk8"
10
+ BRANCH=" master"
11
+
12
+ set -e
13
+
14
+ if [ " $TRAVIS_REPO_SLUG " != " $SLUG " ]; then
15
+ echo " Skipping snapshot deployment: wrong repository. Expected '$SLUG ' but was '$TRAVIS_REPO_SLUG '."
16
+ elif [ " $TRAVIS_JDK_VERSION " != " $JDK " ]; then
17
+ echo " Skipping snapshot deployment: wrong JDK. Expected '$JDK ' but was '$TRAVIS_JDK_VERSION '."
18
+ elif [ " $TRAVIS_PULL_REQUEST " != " false" ]; then
19
+ echo " Skipping snapshot deployment: was pull request."
20
+ elif [ " $TRAVIS_BRANCH " != " $BRANCH " ]; then
21
+ echo " Skipping snapshot deployment: wrong branch. Expected '$BRANCH ' but was '$TRAVIS_BRANCH '."
22
+ else
23
+ echo " Deploying snapshot..."
24
+ ./gradlew artifactoryPublish
25
+ echo " Snapshot deployed!"
26
+ fi
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ USER = hotchemi
5
5
GROUP_ID = com.github.hotchemi
6
6
ARTIFACT_ID_LIBRARY = permissionsdispatcher
7
7
ARTIFACT_ID_PROCESSOR = permissionsdispatcher-processor
8
- VERSION = 2.3.0
8
+ VERSION = 2.3.0-SNAPSHOT
9
9
DESCRIPTION = Annotation-based library for generating runtime permissions dispatcher.
10
10
WEBSITE = https://github.com/hotchemi/PermissionsDispatcher
11
11
LICENCES = ['Apache-2.0']
@@ -16,6 +16,7 @@ KOTLIN_VERSION=1.0.5
16
16
APT_PLUGIN_VERSION =1.8
17
17
BINTRAY_PLUGIN_VERSION =0.3.4
18
18
CONFIG_PLUGIN_VERSION =2.2.2
19
+ JFROG_PLUGIN_VERSION =4.1.1
19
20
20
21
# Dependency versions
21
22
SUPPORT_LIBRARY_VERSION =23.1.1
Original file line number Diff line number Diff line change
1
+ apply plugin : ' com.jfrog.artifactory'
2
+
3
+ artifactory {
4
+ contextUrl = ' https://oss.jfrog.org/artifactory'
5
+ publish {
6
+ repository {
7
+ // The Artifactory repository key to publish to
8
+ repoKey = VERSION . endsWith(' SNAPSHOT' ) ? ' oss-snapshot-local' : ' oss-release-local'
9
+ username = System . getenv(' bintrayUser' ) // The publisher user name
10
+ password = System . getenv(' bintrayKey' ) // The publisher password
11
+ maven = true
12
+ }
13
+ defaults {
14
+ publishArtifacts = true
15
+ publications(' maven' )
16
+ }
17
+ }
18
+ }
Original file line number Diff line number Diff line change @@ -93,3 +93,5 @@ project.afterEvaluate {
93
93
def compileLintTask = project. tasks. find { it. name == ' compileLint' }
94
94
compileLintTask. dependsOn(copyLintJar)
95
95
}
96
+
97
+ apply from : rootProject. file(' gradle/gradle-artifactory-upload.gradle' )
Original file line number Diff line number Diff line change @@ -86,3 +86,5 @@ publish {
86
86
website = WEBSITE
87
87
licences = LICENCES
88
88
}
89
+
90
+ apply from : rootProject. file(' gradle/gradle-artifactory-upload.gradle' )
You can’t perform that action at this time.
0 commit comments