Skip to content

Commit 48e201c

Browse files
gradle scripts for uploading artifact
1 parent 6f1dd56 commit 48e201c

File tree

3 files changed

+112
-0
lines changed

3 files changed

+112
-0
lines changed

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ buildscript {
1010
classpath deps.build.android_gradle_plugin
1111
classpath deps.build.kotlin_gradle_plugin
1212
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.3.2.0"
13+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
14+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
1315
}
1416
}
1517

mvi-valueadd/build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
44
apply plugin: 'kotlin-android-extensions'
5+
apply from: "$rootDir/scripts/jfrog.gradle"
6+
57

68
// Android library configuration
79
android {
@@ -70,3 +72,22 @@ dependencies {
7072
testImplementation deps.test.junit_params
7173
testRuntimeOnly deps.test.junit_engine
7274
}
75+
76+
task sourcesJar(type: Jar) {
77+
classifier = 'sources'
78+
from android.sourceSets.main.java.srcDirs
79+
}
80+
81+
task javadoc(type: Javadoc) {
82+
enabled = false
83+
}
84+
85+
task javadocJar(type: Jar, dependsOn: javadoc) {
86+
classifier = 'javadoc'
87+
from javadoc.destinationDir
88+
}
89+
90+
artifacts {
91+
archives javadocJar
92+
archives sourcesJar
93+
}

scripts/jfrog.gradle

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
apply plugin: 'com.github.dcendents.android-maven'
2+
apply plugin: 'com.jfrog.bintray'
3+
4+
ext {
5+
bintrayRepo = 'maven'
6+
bintrayName = 'MVI-Valueadd'
7+
8+
publishedGroupId = 'pl.valueadd'
9+
libraryName = 'MVI-Valueadd'
10+
artifact = 'mvi'
11+
12+
libraryDescription = 'This library contains architecture for mvi.'
13+
14+
siteUrl = 'https://github.com/valueadd-poland/mvi-valueadd'
15+
gitUrl = 'https://github.com/valueadd-poland/mvi-valueadd.git'
16+
17+
libraryVersion = '0.1'
18+
19+
developerId = 'valueadd-poland'
20+
developerName = 'Valueadd'
21+
developerEmail = '[email protected]'
22+
23+
licenseName = 'The Apache Software License, Version 2.0'
24+
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
25+
allLicenses = ["Apache-2.0"]
26+
}
27+
28+
group = publishedGroupId
29+
version = libraryVersion
30+
31+
install {
32+
repositories.mavenInstaller {
33+
pom.project {
34+
packaging 'aar'
35+
groupId publishedGroupId
36+
artifactId artifact
37+
38+
name libraryName
39+
description libraryDescription
40+
url siteUrl
41+
42+
licenses {
43+
license {
44+
name licenseName
45+
url licenseUrl
46+
}
47+
}
48+
developers {
49+
developer {
50+
id developerId
51+
name developerName
52+
email developerEmail
53+
}
54+
}
55+
scm {
56+
connection gitUrl
57+
developerConnection gitUrl
58+
url siteUrl
59+
}
60+
}
61+
}
62+
}
63+
64+
65+
66+
Properties properties = new Properties()
67+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
68+
69+
bintray {
70+
user = properties.getProperty("bintray.user")
71+
key = properties.getProperty("bintray.apikey")
72+
73+
configurations = ['archives']
74+
pkg {
75+
repo = bintrayRepo
76+
name = bintrayName
77+
desc = libraryDescription
78+
websiteUrl = siteUrl
79+
vcsUrl = gitUrl
80+
licenses = allLicenses
81+
dryRun = false
82+
publish = true
83+
override = false
84+
publicDownloadNumbers = true
85+
version {
86+
desc = libraryDescription
87+
}
88+
}
89+
}

0 commit comments

Comments
 (0)