[rest-gradle-plugin] 31/83: Use Artifactory Gradle plugin to publish
Alastair McKinstry
mckinstry at moszumanska.debian.org
Wed Oct 25 15:59:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository rest-gradle-plugin.
commit f23282491f1ac75f8990a8775726a0fcc3421a43
Author: noamt <noam at 10ne.org>
Date: Sun Aug 10 14:03:03 2014 +0300
Use Artifactory Gradle plugin to publish
---
build.gradle | 52 ++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 44 insertions(+), 8 deletions(-)
diff --git a/build.gradle b/build.gradle
index 79baadb..3656536 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,9 +14,20 @@
* limitations under the License.
*/
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '3.0.1')
+ }
+}
+
+apply plugin: 'maven'
+apply plugin: 'maven-publish'
+apply plugin: 'com.jfrog.artifactory'
apply plugin: 'groovy'
apply plugin: 'idea'
-apply plugin: 'maven'
apply plugin: 'project-reports'
group = 'org._10ne.gradle'
@@ -36,13 +47,8 @@ dependencies {
testCompile 'cglib:cglib-nodep:2.2.2'
}
-task sourcesJar(type: Jar, dependsOn: classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
-}
-
-artifacts {
- archives sourcesJar
+task sourceJar(type: Jar) {
+ from sourceSets.main.allJava
}
task wrapper(type: Wrapper, description: 'Gradle Wrapper task') {
@@ -75,4 +81,34 @@ configure(install.repositories.mavenInstaller) {
}
}
}
+}
+
+artifactory {
+ contextUrl = 'https://oss.jfrog.org'
+ resolve {
+ repoKey = 'remote-repos'
+ username = ''
+ password = ''
+ }
+ publish {
+ defaults {
+ publishArtifacts = true
+ }
+ }
+}
+
+publishing {
+ publications {
+ mainPub(MavenPublication) {
+ from components.java
+
+ artifact sourceJar {
+ classifier 'sources'
+ }
+ }
+ }
+}
+
+artifactoryPublish {
+ publications(publishing.publications.mainPub)
}
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/rest-gradle-plugin.git
More information about the pkg-java-commits
mailing list