Skip to content

Commit

Permalink
Fix generation of POM file
Browse files Browse the repository at this point in the history
  • Loading branch information
danielepantaleone committed Feb 7, 2024
1 parent 12cbac2 commit 2f31eba
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ Add the dependency to your `build.gradle` (Gradle Groovy):

```gradle
dependencies {
androidTestImplementation 'io.github.danielepantaleone:kttestexpectation:1.2.1'
androidTestImplementation 'io.github.danielepantaleone:kttestexpectation:1.2.2'
}
```

or `build.gradle.kts` (Kotlin DSL):

```gradle
dependencies {
androidTestImplementation("io.github.danielepantaleone:kttestexpectation:1.2.1")
androidTestImplementation("io.github.danielepantaleone:kttestexpectation:1.2.2")
}
```

Expand Down
44 changes: 23 additions & 21 deletions kttestexpectation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
compileSdk 34
defaultConfig {
minSdk 23
versionName "1.2.1"
versionName "1.2.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
Expand Down Expand Up @@ -51,28 +51,30 @@ publishing {
afterEvaluate {
from components.release
}
pom {
name = "KTTestExpectation"
description = "A simple Kotlin implementation of Swift's expectation"
url = "https://github.com/danielepantaleone/KTTestExpectation"
licenses {
license {
name = "MIT"
url = "https://github.com/danielepantaleone/KTTestExpectation/blob/master/LICENSE"
pom.withXml {
def rootNode = asNode()
rootNode.appendNode('name', 'KTTestExpectation')
rootNode.appendNode('description', 'A simple Kotlin implementation of Swift\'s expectation')
rootNode.appendNode('url', 'https://github.com/danielepantaleone/KTTestExpectation')
def licensesNode = rootNode.appendNode('licenses')
def licenseNode = licensesNode.appendNode('license')
licenseNode.appendNode('name', 'MIT')
licenseNode.appendNode('url', 'https://github.com/danielepantaleone/KTTestExpectation/blob/master/LICENSE')
def developersNode = rootNode.appendNode('developers')
def developerNode = developersNode.appendNode('developer')
developerNode.appendNode('id', 'danielepantaleone')
developerNode.appendNode('name', 'Daniele Pantaleone')
developerNode.appendNode('email', '[email protected]')
def dependenciesNode = rootNode.appendNode('dependencies')
def configurationNames = ["implementation"]
configurationNames.each { confName ->
configurations[confName].allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
developers {
developer {
id = "danielepantaleone"
name = "Daniele Pantaleone"
email = "[email protected]"
}
}
scm {
connection = "https://github.com/danielepantaleone/KTTestExpectation.git"
developerConnection = "https://github.com/danielepantaleone/KTTestExpectation.git"
url = "https://github.com/danielepantaleone/KTTestExpectation"
}
}
}
}
Expand Down

0 comments on commit 2f31eba

Please sign in to comment.