Skip to content

Commit

Permalink
Include KotlinStdLib in pom.xml to used this library on JavaProject
Browse files Browse the repository at this point in the history
  • Loading branch information
lopspower committed Jun 27, 2019
1 parent 6570a6d commit f2362b5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apply from: 'dependencies.gradle'

buildscript {
ext.kotlin_version = '1.3.31'
ext.kotlin_version = '1.3.40'
repositories {
google()
jcenter()
Expand Down
10 changes: 10 additions & 0 deletions circularimageview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ publishing {
groupId libGroupId
artifactId libArtifactId
version libVersion

pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
// Add KotlinStdlib
def kotlinStdlibDepNode = dependenciesNode.appendNode('dependency')
kotlinStdlibDepNode.appendNode('groupId', kotlinStdlibGroupId)
kotlinStdlibDepNode.appendNode('artifactId', kotlinStdlibArtifactId)
kotlinStdlibDepNode.appendNode('version', kotlinStdlibVersion)
}

artifact(sourceJar)
artifact("$buildDir/outputs/aar/$libArtifactId-release.aar")
}
Expand Down
9 changes: 6 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ allprojects {

ext {
// APP VERSION
androidVersionCode = 13
androidVersionName = "4.0.0"
androidVersionCode = 14
androidVersionName = "4.0.1"

// ANDROID VERSION
androidCompileSdkVersion = 28
androidMinSdkVersion = 14
androidTargetSdkVersion = 28

// KOTLIN
kotlinStdlib = "org.jetbrains.kotlin:kotlin-stdlib:${ext.kotlin_version}"
kotlinStdlibGroupId = "org.jetbrains.kotlin"
kotlinStdlibArtifactId = "kotlin-stdlib"
kotlinStdlibVersion = ext.kotlin_version
kotlinStdlib = "$kotlinStdlibGroupId:$kotlinStdlibArtifactId:$kotlinStdlibVersion"

// ANDROID LIB
androidAppCompatXVersion = '1.0.2'
Expand Down

0 comments on commit f2362b5

Please sign in to comment.