Skip to content

Commit

Permalink
Merge pull request #7 from razvn/add_support_for_multiplatform_projects
Browse files Browse the repository at this point in the history
Add support for multiplatform projects
  • Loading branch information
razvn authored Sep 6, 2022
2 parents a8e0512 + f2a53af commit f355cba
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 167 deletions.
6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

This list is not intended to be all-encompassing - it will document major and breaking changes with their rationale when appropriate:

### v1.0.2
- Fix: support sources from kotlin multiplatform projects

### v1.0.1
- Fix: multiple sourceinfo entries support in the jacoco report

Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# JacocoToCobertura Gradle Plugin

![Current release](https://img.shields.io/github/v/release/razvn/jacoco-to-cobertura-gradle-plugin)
[![Gradle Plugin Portal](https://img.shields.io/badge/Gradle-v1.0.1-blue.svg)](https://plugins.gradle.org/plugin/net.razvan.jacoco-to-cobertura)
[![Gradle Plugin Portal](https://img.shields.io/badge/Gradle-v1.0.2-blue.svg)](https://plugins.gradle.org/plugin/net.razvan.jacoco-to-cobertura)

The aim of the plugin is to convert the Jacoco XML report to Cobertura report in order for GitLab to use the infos
for [showing the lines covered by tests in the Merge Request](https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html).
Expand All @@ -14,7 +14,7 @@ The project is an adaptation of the python version [cover2cover](https://github.
```kotlin
plugins {
jacoco
id("net.razvan.jacoco-to-cobertura") version "1.0.1"
id("net.razvan.jacoco-to-cobertura") version "1.0.2"
}
```

Expand All @@ -37,10 +37,16 @@ Run the task: `jacocoToCobertura`. The task should be run after `jacocoTestRepor
./gradlew jacocoToCobertura
```

or just set it after jacocoTestReport
or just set it after `jacocoTestReport`
```kotlin
tasks.jacocoTestReport {
finalizedBy(tasks.jacocoToCobertura)
}
```
or `koverXmlReport`
```kotlin
tasks.koverXmlReport {
finalizedBy(tasks.jacocoToCobertura)
}
```

5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("java-gradle-plugin")
kotlin("jvm") version "1.7.0"
kotlin("jvm") version "1.7.10"
id("maven-publish")
id("com.gradle.plugin-publish") version "0.18.0"
id("com.gradle.plugin-publish") version "1.0.0"
}

group = "net.razvan"
Expand All @@ -15,6 +15,7 @@ repositories {

dependencies {
implementation("org.simpleframework:simple-xml:2.7.1")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
testImplementation(kotlin("test"))
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kotlin.code.style=official
version=1.0.1
version=1.0.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f355cba

Please sign in to comment.