-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from cqse/ts/34214_update
TS-34214 Update dependencies
- Loading branch information
Showing
81 changed files
with
891 additions
and
855 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ | |
report-generator/test-coverage-*.xml | ||
gradle.properties | ||
**/maven-wrapper.jar | ||
**/logTest/** | ||
**/jacoco.exec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
plugins { | ||
com.teamscale.`java-convention` | ||
alias(libs.plugins.markdownToPdf) | ||
application | ||
|
||
// we don't want to cause conflicts between our dependencies and the target application | ||
// since the agent will be loaded with the same class loader as the profiled application | ||
// so we use the shadow plugin to relocate our dependencies | ||
com.teamscale.`shadow-convention` | ||
com.teamscale.coverage | ||
com.teamscale.publish | ||
} | ||
|
||
publishAs { | ||
artifactId.set("teamscale-jacoco-agent") | ||
readableName.set("Teamscale JaCoCo Agent") | ||
description.set("JVM profiler that simplifies various aspects around recording and uploading test coverage") | ||
} | ||
|
||
val appVersion = rootProject.extra("appVersion").toString() | ||
val jacocoVersion = libs.versions.jacoco.get() | ||
val outputVersion = "$appVersion-jacoco-$jacocoVersion" | ||
|
||
dependencies { | ||
implementation(libs.jetty.server) | ||
implementation(libs.jetty.servlet) | ||
|
||
implementation(libs.jersey.server) | ||
implementation(libs.jersey.containerServletCore) | ||
implementation(libs.jersey.containerJettyHttp) | ||
implementation(libs.jersey.mediaJsonJackson) | ||
implementation(libs.jersey.hk2) | ||
|
||
implementation(project(":teamscale-client")) | ||
implementation(project(":report-generator")) | ||
|
||
implementation(libs.jacoco.core) | ||
implementation(libs.jacoco.report) | ||
implementation(libs.jacoco.agent) { | ||
artifact { | ||
classifier = "runtime" | ||
} | ||
} | ||
|
||
implementation(libs.logback.core) | ||
implementation(libs.logback.classic) | ||
|
||
implementation(libs.jcommander) | ||
implementation(libs.teamscaleLibCommons) | ||
|
||
implementation(libs.retrofit.core) | ||
|
||
implementation(libs.moshi) | ||
|
||
testImplementation(project(":tia-client")) | ||
testImplementation(libs.retrofit.converter.moshi) | ||
testImplementation(libs.okhttp.mockwebserver) | ||
} | ||
|
||
application { | ||
mainClass.set("com.teamscale.jacoco.agent.Main") | ||
} | ||
|
||
tasks.shadowJar { | ||
// since this is used as an agent, we want it to always have the same name | ||
// otherwise people have to adjust their -javaagent parameters after every | ||
// update | ||
archiveFileName.set("teamscale-jacoco-agent.jar") | ||
|
||
manifest { | ||
attributes["Premain-Class"] = "com.teamscale.jacoco.agent.PreMain" | ||
} | ||
} | ||
|
||
tasks.startShadowScripts { | ||
applicationName = "convert" | ||
} | ||
|
||
distributions { | ||
named("shadow") { | ||
distributionBaseName.set("teamscale-jacoco-agent") | ||
contents { | ||
from(tasks.readmeToPdf) { | ||
into("documentation") | ||
rename("README.pdf", "userguide.pdf") | ||
} | ||
|
||
filesMatching("**/VERSION.txt") { | ||
filter { | ||
it.replace("%APP_VERSION_TOKEN_REPLACED_DURING_BUILD%", outputVersion) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.shadowDistZip { | ||
archiveFileName.set("teamscale-jacoco-agent.zip") | ||
} | ||
|
||
tasks.processResources { | ||
filesMatching("**/app.properties") { | ||
filter { | ||
it.replace("%APP_VERSION_TOKEN_REPLACED_DURING_BUILD%", appVersion) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
plugins { | ||
alias(libs.plugins.versions) | ||
alias(libs.plugins.nexusPublish) | ||
} | ||
|
||
group = "com.teamscale" | ||
|
||
val appVersion by extra("29.1.3") | ||
|
||
val snapshotVersion = appVersion + if (VersionUtils.isTaggedRelease()) "" else "-SNAPSHOT" | ||
|
||
allprojects { | ||
version = snapshotVersion | ||
} | ||
|
||
// Installs all Maven artifacts to your local Maven repository | ||
val publishToMavenLocal by tasks.registering | ||
|
||
subprojects { | ||
// must be run after evaluation because the publishToMavenLocal tasks are generated by our plugin during | ||
// project evaluation | ||
afterEvaluate { | ||
val publishTask = tasks.findByPath("publishToMavenLocal") | ||
if (publishTask != null) { | ||
publishToMavenLocal.configure { | ||
dependsOn(publishTask) | ||
} | ||
} | ||
} | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype() | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import org.gradle.api.tasks.testing.Test | ||
import org.gradle.kotlin.dsl.get | ||
import java.io.File | ||
|
||
/** Determines the file under which the shadowJar task will store the final Teamscale JaCoCo Agent jar. */ | ||
val Test.agentJar: File | ||
get() { | ||
return project.project(":agent").tasks["shadowJar"].outputs.files.singleFile | ||
} | ||
|
||
/** Adds a convenient way to attach the Teamscale JaCoCo agent to the test JVM with the given options in a readable map format. */ | ||
fun Test.teamscaleAgent(options: Map<String, String>) { | ||
jvmArgs( | ||
"-javaagent:$agentJar=${options.entries.joinToString(separator = ",") { "${it.key}=${it.value}" }}" | ||
) | ||
} |
Oops, something went wrong.