Skip to content

Commit

Permalink
build: fix maven repo url
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkadiusz Pałka committed Oct 21, 2020
1 parent 2a02c00 commit a49f4f9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 20 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@ This is library for handling mvi architecture and android lifecycle events, full
# Dependency
`implementation 'pl.valueadd:mvi:{current_version}'`

### Upload to Bintray

#### mvi

```
./gradlew :mvi:bintrayUpload
```

#### mvi-presenter

```
./gradlew :mvi-presenter:bintrayUpload
```

6 changes: 0 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,4 @@ allprojects {
apply from: "$rootDir/scripts/detekt.gradle"
apply from: "$rootDir/scripts/ktlint.gradle"
apply from: "$rootDir/scripts/pmd.gradle"
}

subprojects { Project project ->
if (project.name.startsWith('mvi')) {

}
}
7 changes: 5 additions & 2 deletions mvi-presenter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'java-library'
apply plugin: 'kotlin'
apply from: 'publish.gradle'

// Java library configuration
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}

Expand All @@ -26,4 +26,7 @@ dependencies {
testImplementation deps.test.junit_api
testImplementation deps.test.junit_params
testRuntimeOnly deps.test.junit_engine
}
}

// Apply last plugins
apply from: 'publish.gradle'
7 changes: 0 additions & 7 deletions mvi-presenter/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ afterEvaluate { Project project ->
artifactId = project.artifactId
version = project.libraryVersionName
groupId = publishedGroupId
artifact project.sourcesJar {
classifier "sources"
}

pom {
packaging = 'jar'
Expand Down Expand Up @@ -59,7 +56,3 @@ bintray {
name = artifactId
}
}

task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
}
19 changes: 15 additions & 4 deletions scripts/publish-apply.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import java.nio.file.Files

apply from: "$rootDir/scripts/versioning.gradle"
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'

// Publishing config

project.afterEvaluate {
publishing {
repositories {
maven {
def releasesRepoUrl = "https://dl.bintray.com/valueadd/android"
println("Repository url is $releasesRepoUrl")
url = "https://dl.bintray.com/valueadd/android"
}
}
}
}

ext {
libraryRepository = 'maven'
publishedGroupId = 'pl.valueadd'
libraryName = 'MVI-Valueadd'

Expand All @@ -34,6 +38,10 @@ ext {
group = publishedGroupId
version = libraryVersionName

//endregion

//region Bintray

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

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

pkg {
repo = 'android'
repo = libraryRepository
desc = libraryDescription
userOrg = 'valueadd'
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
Expand All @@ -52,9 +61,11 @@ bintray {
override = true
publicDownloadNumbers = true
version {
released = new Date()
released = new Date()
name = libraryVersionName
desc = libraryVersionTag
}
}
}

//endregion
4 changes: 3 additions & 1 deletion scripts/versioning.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
task printVersionName() {
println(getProductionVersionName() + " (" + getProductionVersionCode() + ")")
doLast {
println(getProductionVersionName() + " (" + getProductionVersionCode() + ")")
}
}

@SuppressWarnings("GroovyUnusedDeclaration")
Expand Down

0 comments on commit a49f4f9

Please sign in to comment.