1+ ext {
2+ pom = [
3+ publishedGroupId : ' com.shopify.testify' ,
4+ artifact : ' testify' ,
5+ libraryName : ' testify' ,
6+ libraryDescription : ' Android screenshot instrumentation tests.' ,
7+ siteUrl : ' https://github.com/Shopify/android-testify' ,
8+ gitUrl : ' https://github.com/Shopify/android-testify.git' ,
9+ licenseName : ' The MIT License' ,
10+ licenseUrl : ' https://opensource.org/licenses/MIT'
11+ ]
12+ }
13+
14+ group = pom. publishedGroupId
15+
16+ install {
17+ repositories. mavenInstaller {
18+ pom {
19+ project {
20+ packaging ' aar'
21+ groupId project. ext. pom. publishedGroupId
22+ artifactId project. ext. pom. artifact
23+ name project. ext. pom. libraryName
24+ description project. ext. pom. libraryDescription
25+ url project. ext. pom. siteUrl
26+ licenses {
27+ license {
28+ name project. ext. pom. licenseName
29+ url project. ext. pom. licenseUrl
30+ }
31+ }
32+ scm {
33+ connection project. ext. pom. gitUrl
34+ developerConnection project. ext. pom. gitUrl
35+ url project. ext. pom. siteUrl
36+ }
37+ }
38+ }
39+ }
40+ }
41+
42+ dokka {
43+ outputFormat = " html"
44+ outputDirectory = " $buildDir /javadoc"
45+
46+ configuration {
47+ includeNonPublic = false
48+ reportUndocumented = false
49+ }
50+ }
51+
52+ task javadocJar (type : Jar , dependsOn : dokka) {
53+ classifier = ' javadoc'
54+ baseName = ' testify'
55+ from dokka. outputDirectory
56+ }
57+
58+ task sourcesJar (type : Jar ) {
59+ from android. sourceSets. main. java. srcDirs
60+ classifier = ' sources'
61+ }
62+
63+ ext {
64+ bintray = [
65+ org : ' shopify' ,
66+ repo : ' shopify-android' ,
67+ name : ' testify' ,
68+ allLicenses : [" MIT" ]
69+ ]
70+ }
71+
72+ artifacts {
73+ archives javadocJar
74+ archives sourcesJar
75+ }
76+
77+ bintray {
78+ // These values can be found on https://bintray.com/profile/edit
79+ user = System . getenv(' BINTRAY_USER' )
80+ // BINTRAY_USER : your personal profile name (from "Your Profile")
81+ key = System . getenv(' BINTRAY_KEY' ) // BINTRAY_KEY : found on the left menu, under "API Key"
82+
83+ configurations = [' archives' ]
84+
85+ pkg {
86+ userOrg = project. ext. bintray. org
87+ repo = project. ext. bintray. repo
88+ name = project. ext. bintray. name
89+ desc = project. ext. pom. libraryDescription
90+ websiteUrl = project. ext. pom. siteUrl
91+ vcsUrl = project. ext. pom. gitUrl
92+ licenses = project. ext. bintray. allLicenses
93+ publish = true
94+ publicDownloadNumbers = true
95+ version {
96+ desc = project. ext. pom. libraryDescription
97+ }
98+ }
99+ }
100+
101+ bintrayUpload {
102+ dependsOn install
103+ doFirst {
104+ if (System . getenv(' BINTRAY_USER' ). isEmpty()) {
105+ throw new IllegalArgumentException (" BINTRAY_USER must be defined" )
106+ }
107+ if (System . getenv(' BINTRAY_KEY' ). isEmpty()) {
108+ throw new IllegalArgumentException (" BINTRAY_KEY must be defined" )
109+ }
110+ }
111+ }
0 commit comments