Skip to content

Commit 71026b3

Browse files
author
Samuel Urbanowicz
authored
Merge pull request #58 from netguru/update_dependencies
Fix artifact uploading
2 parents da860b7 + d4492f3 commit 71026b3

4 files changed

Lines changed: 30 additions & 26 deletions

File tree

android/build.gradle

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,45 @@ publishing {
1616
artifact("$buildDir/outputs/aar/android-release.aar")
1717
artifact sourcesJar
1818
artifactId 'kissme-android'
19+
version project.libraryVersion
1920

20-
//The publication doesn't know about our dependencies, so we have to manually add them to the pom
2121
pom.withXml {
2222
def dependenciesNode = asNode().appendNode('dependencies')
23-
24-
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
25-
configurations.compile.allDependencies.each {
26-
def dependencyNode = dependenciesNode.appendNode('dependency')
27-
dependencyNode.appendNode('groupId', it.group)
28-
dependencyNode.appendNode('artifactId', it.name)
29-
dependencyNode.appendNode('version', it.version)
23+
// Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
24+
configurations.implementation.allDependencies.each {
25+
// Ensure dependencies such as fileTree are not included in the pom.
26+
if (it.name != 'unspecified') {
27+
println(it.name)
28+
def dependencyNode = dependenciesNode.appendNode('dependency')
29+
dependencyNode.appendNode('groupId', it.group)
30+
dependencyNode.appendNode('artifactId', it.name)
31+
dependencyNode.appendNode('version', it.version)
32+
}
3033
}
3134
}
3235
}
3336
}
3437
}
3538

3639
android {
37-
compileSdkVersion androidCompileSdkVersion
40+
compileSdkVersion 28
3841
defaultConfig {
39-
minSdkVersion androidMinSdkVersion
40-
}
41-
testOptions.unitTests.includeAndroidResources = true
42-
43-
sourceSets.all {
44-
it.java.srcDir "src/$it.name/kotlin"
42+
minSdkVersion 23
43+
targetSdkVersion 28
44+
versionCode 1
45+
versionName '1.0'
4546
}
46-
47-
// TODO replace with https://issuetracker.google.com/issues/72050365 once released.
48-
libraryVariants.all {
49-
it.generateBuildConfig.enabled = false
47+
buildTypes {
48+
release {
49+
minifyEnabled false
50+
}
5051
}
5152
}
5253

5354
dependencies {
5455
expectedBy project(':common')
5556
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
56-
// compile type binaryprefs dependency is needed to specify that
57-
// it should be included in the .pom file of the kissme-android artifact
58-
// TODO: find a better way to declare it
59-
compile "com.github.yandextaxitech:binaryprefs:1.0.1"
57+
implementation "com.github.yandextaxitech:binaryprefs:1.0.1"
6058
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
6159
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
6260
testImplementation "io.mockk:mockk:1.9.3"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1313
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:$kotlin_version"
1414
classpath "com.android.tools.build:gradle:3.4.0"
15-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.2-SNAPSHOT'
15+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1616
}
1717
}
1818

buildsystem/publish-bintray.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apply plugin: 'maven'
33
apply plugin: 'maven-publish'
44
apply plugin: 'com.jfrog.bintray'
55
// ------------- tasks
6+
67
publishing {
78
repositories {
89
maven { url = 'https://dl.bintray.com/netguru/maven/' }
@@ -18,10 +19,14 @@ bintray {
1819
repo = 'maven'
1920
name = 'Kissme'
2021
publish = true
22+
publicDownloadNumbers = true
23+
licenses = ['Apache-2.0']
24+
vcsUrl = 'https://github.com/netguru/Kissme'
2125
version {
2226
name = project.version
2327
vcsTag = project.version
2428
released = new Date()
29+
vcsTag = this.version
2530
}
2631
}
2732
}
@@ -31,6 +36,6 @@ bintrayUpload.dependsOn publishToMavenLocal
3136
bintrayUpload.doFirst {
3237
publications = project.publishing.publications.findAll { !it.name.contains('test') }.collect {
3338
println("Uploading artifact '$it.groupId:$it.artifactId:$it.version' from publication '$it.name'")
34-
it
39+
it.name
3540
}
36-
}
41+
}

common/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ publishing {
55
mavenJava(MavenPublication) {
66
from components.java
77
artifactId "kissme-common"
8+
version project.libraryVersion
89
}
910
}
1011
}

0 commit comments

Comments
 (0)