Skip to content

Commit a49f4f9

Browse files
author
Arkadiusz Pałka
committed
build: fix maven repo url
1 parent 2a02c00 commit a49f4f9

File tree

6 files changed

+37
-20
lines changed

6 files changed

+37
-20
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,17 @@ This is library for handling mvi architecture and android lifecycle events, full
44
# Dependency
55
`implementation 'pl.valueadd:mvi:{current_version}'`
66

7+
### Upload to Bintray
8+
9+
#### mvi
10+
11+
```
12+
./gradlew :mvi:bintrayUpload
13+
```
14+
15+
#### mvi-presenter
16+
17+
```
18+
./gradlew :mvi-presenter:bintrayUpload
19+
```
20+

build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,4 @@ allprojects {
3131
apply from: "$rootDir/scripts/detekt.gradle"
3232
apply from: "$rootDir/scripts/ktlint.gradle"
3333
apply from: "$rootDir/scripts/pmd.gradle"
34-
}
35-
36-
subprojects { Project project ->
37-
if (project.name.startsWith('mvi')) {
38-
39-
}
4034
}

mvi-presenter/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apply plugin: 'java-library'
22
apply plugin: 'kotlin'
3-
apply from: 'publish.gradle'
43

54
// Java library configuration
65
java {
76
sourceCompatibility = JavaVersion.VERSION_1_8
87
targetCompatibility = JavaVersion.VERSION_1_8
8+
withJavadocJar()
99
withSourcesJar()
1010
}
1111

@@ -26,4 +26,7 @@ dependencies {
2626
testImplementation deps.test.junit_api
2727
testImplementation deps.test.junit_params
2828
testRuntimeOnly deps.test.junit_engine
29-
}
29+
}
30+
31+
// Apply last plugins
32+
apply from: 'publish.gradle'

mvi-presenter/publish.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ afterEvaluate { Project project ->
1313
artifactId = project.artifactId
1414
version = project.libraryVersionName
1515
groupId = publishedGroupId
16-
artifact project.sourcesJar {
17-
classifier "sources"
18-
}
1916

2017
pom {
2118
packaging = 'jar'
@@ -59,7 +56,3 @@ bintray {
5956
name = artifactId
6057
}
6158
}
62-
63-
task sourcesJar(type: Jar, dependsOn: classes) {
64-
from sourceSets.main.allSource
65-
}

scripts/publish-apply.gradle

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
import java.nio.file.Files
2+
13
apply from: "$rootDir/scripts/versioning.gradle"
24
apply plugin: 'com.jfrog.bintray'
35
apply plugin: 'maven-publish'
46

7+
// Publishing config
8+
59
project.afterEvaluate {
610
publishing {
711
repositories {
812
maven {
9-
def releasesRepoUrl = "https://dl.bintray.com/valueadd/android"
10-
println("Repository url is $releasesRepoUrl")
13+
url = "https://dl.bintray.com/valueadd/android"
1114
}
1215
}
1316
}
1417
}
1518

1619
ext {
20+
libraryRepository = 'maven'
1721
publishedGroupId = 'pl.valueadd'
1822
libraryName = 'MVI-Valueadd'
1923

@@ -34,6 +38,10 @@ ext {
3438
group = publishedGroupId
3539
version = libraryVersionName
3640

41+
//endregion
42+
43+
//region Bintray
44+
3745
Properties properties = new Properties()
3846
properties.load(project.rootProject.file('local.properties').newDataInputStream())
3947

@@ -42,8 +50,9 @@ bintray {
4250
key = properties.getProperty("bintray.apikey")
4351

4452
pkg {
45-
repo = 'android'
53+
repo = libraryRepository
4654
desc = libraryDescription
55+
userOrg = 'valueadd'
4756
websiteUrl = siteUrl
4857
vcsUrl = gitUrl
4958
licenses = allLicenses
@@ -52,9 +61,11 @@ bintray {
5261
override = true
5362
publicDownloadNumbers = true
5463
version {
55-
released = new Date()
64+
released = new Date()
5665
name = libraryVersionName
5766
desc = libraryVersionTag
5867
}
5968
}
6069
}
70+
71+
//endregion

scripts/versioning.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
task printVersionName() {
2-
println(getProductionVersionName() + " (" + getProductionVersionCode() + ")")
2+
doLast {
3+
println(getProductionVersionName() + " (" + getProductionVersionCode() + ")")
4+
}
35
}
46

57
@SuppressWarnings("GroovyUnusedDeclaration")

0 commit comments

Comments
 (0)