1+ apply plugin : ' maven-publish'
2+ apply plugin : ' com.jfrog.bintray'
3+
4+ ext {
5+ bintrayRepo = ' CodeQuality-Android'
6+ bintrayName = ' CodeQuality-Android'
7+
8+ publishedGroupId = ' ru.mobileup'
9+ libraryName = ' CodeQuality-Android'
10+ artifact = ' code-quality-android'
11+
12+ libraryDescription = ' Gradle plugin for integration with Gitlab Code Quality'
13+ libraryVersion = ' 1.0.0'
14+
15+ siteUrl = ' https://github.com/MobileUpLLC/CodeQuality-Android/'
16+ gitUrl = ' https://github.com/MobileUpLLC/CodeQuality-Android.git'
17+
18+ developerId = ' MobileUp'
19+ developerName = ' MobileUp'
20+ developerEmail
= ' [email protected] ' 21+
22+ licenseName = ' The MIT License'
23+ licenseUrl = ' https://github.com/MobileUpLLC/CodeQuality-Android/blob/master/LICENSE'
24+ allLicenses = [' MIT' ]
25+ }
26+
27+ java {
28+ withJavadocJar()
29+ withSourcesJar()
30+ }
31+
32+ // Create Maven Artifact
33+ publishing {
34+ publications {
35+ codeQualityAndroid(MavenPublication ) {
36+ from components. java
37+ groupId publishedGroupId
38+ artifactId artifact
39+ version libraryVersion
40+ pom {
41+ name = libraryName
42+ description = libraryDescription
43+ url = siteUrl
44+ licenses {
45+ license {
46+ name = licenseName
47+ url = licenseUrl
48+ }
49+ }
50+ developers {
51+ developer {
52+ id = developerId
53+ name = developerName
54+ email = developerEmail
55+ }
56+ }
57+ scm {
58+ connection = gitUrl
59+ developerConnection = gitUrl
60+ url = siteUrl
61+ }
62+ }
63+ }
64+ }
65+ }
66+
67+ // Publish to Bintray. Use "./gradlew bintrayUpload" to run it.
68+ Properties properties = new Properties ()
69+ properties. load(file(' local.properties' ). newDataInputStream())
70+
71+ bintray {
72+ user = properties. getProperty(' bintray.user' )
73+ key = properties. getProperty(' bintray.apikey' )
74+ publications = [' codeQualityAndroid' ]
75+
76+ pkg {
77+ repo = bintrayRepo
78+ name = bintrayName
79+ desc = libraryDescription
80+ websiteUrl = siteUrl
81+ vcsUrl = gitUrl
82+ licenses = allLicenses
83+ userOrg = properties. getProperty(' bintray.userOrg' )
84+ publish = true
85+ publicDownloadNumbers = true
86+ version {
87+ name = libraryVersion
88+ desc = libraryDescription
89+ gpg {
90+ sign = true
91+ passphrase = properties. getProperty(' bintray.gpg.password' )
92+ }
93+ }
94+ }
95+ }
0 commit comments