-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into inferred-spans-upstream
- Loading branch information
Showing
26 changed files
with
175 additions
and
224 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id("java") | ||
id("elastic-otel.java-conventions") | ||
} | ||
|
||
dependencies { | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
java | ||
id("elastic-otel.java-conventions") | ||
} | ||
|
||
dependencies { | ||
|
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,54 @@ | ||
import java.io.FileInputStream | ||
import java.nio.file.Paths | ||
import java.nio.file.Files | ||
import java.nio.file.StandardCopyOption | ||
|
||
plugins { | ||
alias(catalog.plugins.nexusPublish) | ||
} | ||
|
||
val versionProperties = java.util.Properties() | ||
versionProperties.load(FileInputStream(file("version.properties"))) | ||
|
||
group = "co.elastic.otel" | ||
version = versionProperties.get("version").toString() | ||
description = "Elastic Distribution for OpenTelemetry Java" | ||
|
||
defaultTasks("agent:assemble") | ||
|
||
subprojects { | ||
group = rootProject.group | ||
version = rootProject.version | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype() | ||
} | ||
} | ||
|
||
tasks { | ||
|
||
register("currentVersion") { | ||
doLast { | ||
println(project.version) | ||
} | ||
} | ||
|
||
register("setVersion") { | ||
doLast { | ||
val versionFile = file("version.properties") | ||
versionFile.writeText("version=${project.property("newVersion")}\n") | ||
} | ||
} | ||
|
||
register("setNextVersion") { | ||
doLast { | ||
val semVer = "\\d+\\.\\d+\\.\\d+".toRegex().find(version.toString())!!.value; | ||
val nums = semVer.split('.'); | ||
|
||
val versionFile = file("version.properties") | ||
versionFile.writeText("version=${nums[0]}.${nums[1]}.${nums[2].toInt() + 1}-SNAPSHOT\n") | ||
} | ||
} | ||
} |
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
55 changes: 51 additions & 4 deletions
55
buildSrc/src/main/kotlin/elastic-otel.java-conventions.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
18 changes: 18 additions & 0 deletions
18
buildSrc/src/main/kotlin/elastic-otel.spotless-conventions.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plugins { | ||
id("com.diffplug.spotless") | ||
} | ||
|
||
spotless { | ||
java { | ||
target("src/**/*.java") | ||
googleJavaFormat() | ||
|
||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public)") | ||
.named("default") | ||
|
||
licenseHeaderFile(rootProject.file("buildscripts/spotless.reallogic.license.java"), "(package|import|public)") | ||
.named("reallogic") | ||
.onlyIfContentMatches("package co.elastic.otel.profiler.collections;") | ||
|
||
} | ||
} |
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
Oops, something went wrong.