-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate build from Groovy to Kotlin DSL (#247)
Co-authored-by: Trask Stalnaker <[email protected]>
- Loading branch information
Showing
25 changed files
with
250 additions
and
253 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 |
---|---|---|
|
@@ -33,3 +33,6 @@ bin | |
|
||
# Vim | ||
.swp | ||
|
||
# Polyglot runtime manager (asdf rust clone) | ||
.rtx.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
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,31 @@ | ||
plugins { | ||
id("com.diffplug.spotless") | ||
id("com.github.johnrengelman.shadow") apply false | ||
id("java-library") | ||
} | ||
|
||
subprojects { | ||
apply(plugin = "com.diffplug.spotless") | ||
apply(plugin = "java-library") | ||
apply(plugin = "com.github.johnrengelman.shadow") | ||
|
||
group = "io.opentelemetry" | ||
version = "0.1.0-SNAPSHOT" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// using the bom ensures that all of your opentelemetry dependency versions are aligned | ||
implementation(platform("io.opentelemetry:opentelemetry-bom-alpha:1.31.0-alpha")) | ||
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.31.0-alpha")) | ||
} | ||
|
||
spotless { | ||
java { | ||
targetExclude("**/generated/**") | ||
googleJavaFormat() | ||
} | ||
} | ||
} |
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 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 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,40 @@ | ||
import org.springframework.boot.gradle.tasks.bundling.BootJar | ||
|
||
plugins { | ||
id("java") | ||
id("org.springframework.boot") version "2.7.17" | ||
id("io.spring.dependency-management") version "1.1.4" | ||
} | ||
|
||
description = "OpenTelemetry Example for Java Agent" | ||
val moduleName by extra { "io.opentelemetry.examples.javagent" } | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(8)) | ||
} | ||
} | ||
|
||
val agent = configurations.create("agent") | ||
|
||
dependencies { | ||
implementation("io.opentelemetry:opentelemetry-api") | ||
|
||
//spring modules | ||
implementation("org.springframework.boot:spring-boot-starter-web") | ||
|
||
agent("io.opentelemetry.javaagent:opentelemetry-javaagent:1.31.0") | ||
} | ||
|
||
val copyAgent = tasks.register<Copy>("copyAgent") { | ||
from(agent.singleFile) | ||
into(layout.buildDirectory.dir("agent")) | ||
rename("opentelemetry-javaagent-.*\\.jar", "opentelemetry-javaagent.jar") | ||
} | ||
|
||
|
||
tasks.named<BootJar>("bootJar") { | ||
dependsOn(copyAgent) | ||
|
||
archiveFileName = "app.jar" | ||
} |
4 changes: 2 additions & 2 deletions
4
kotlin-extension/build.gradle → kotlin-extension/build.gradle.kts
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 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 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 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 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
16 changes: 9 additions & 7 deletions
16
micrometer-shim/build.gradle → micrometer-shim/build.gradle.kts
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 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 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.
Oops, something went wrong.