Skip to content

Commit

Permalink
Merge pull request #53 from RADAR-base/release-0.5.1
Browse files Browse the repository at this point in the history
Release 0.5.1
  • Loading branch information
Bdegraaf1234 authored Jul 12, 2024
2 parents f5d3893 + 93243a6 commit f1e2d05
Show file tree
Hide file tree
Showing 82 changed files with 1,538 additions and 968 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[{*.yml, *.yaml}]
indent_size = 2

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
radar-app-config-frontend/docker/30-env-subst.sh text eol=lf
2 changes: 1 addition & 1 deletion .github/workflows/publish_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Has SNAPSHOT version
id: is-snapshot
run: grep 'version = ".*-SNAPSHOT"' build.gradle.kts
run: grep 'project = ".*-SNAPSHOT"' buildSrc/src/main/kotlin/Versions.kt

- uses: actions/setup-java@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

# Compile code
- name: Compile code
run: ./gradlew assemble
run: ./gradlew assemble collectLicense

- name: Use Node.js 16
uses: actions/setup-node@v3
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Upload to GitHub
uses: AButler/upload-release-assets@v2.0
with:
files: '*/build/libs/*;radar-app-config/build/distributions/*;radar-app-config-frontend/dist/radar-app-config-frontend.zip'
files: '*/build/libs/*;radar-app-config/build/distributions/*;radar-app-config-frontend/dist/radar-app-config-frontend.zip;*/build/reports/*.tar.gz'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install gpg secret key
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Snyk test
on:
pull_request:
branches:
- master
branches: [ master, dev ]
jobs:
security:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -34,3 +33,4 @@ jobs:
--configuration-matching='^runtimeClasspath$'
--org=radar-base
--policy-path=$PWD/.snyk
--severity-threshold=high
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ out/

.idea/

etc/smtp.env
docker/etc/smtp.env
231 changes: 47 additions & 184 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,50 +1,46 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import org.radarbase.gradle.plugin.radarKotlin
import org.radarbase.gradle.plugin.radarPublishing

plugins {
kotlin("jvm") apply false
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7"
id("com.github.ben-manes.versions")
id("org.jetbrains.dokka") apply false
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin")
id("org.radarbase.radar-root-project") version Versions.radarCommons
id("org.radarbase.radar-dependency-management") version Versions.radarCommons
id("org.radarbase.radar-kotlin") version Versions.radarCommons apply false
id("org.radarbase.radar-publishing") version Versions.radarCommons apply false
kotlin("plugin.serialization") version Versions.kotlin apply false
}

allprojects {
group = "org.radarbase"
version = "0.5.0"
radarRootProject {
projectVersion.set(Versions.project)
}

val githubRepoName = "RADAR-base/radar-app-config"
val githubUrl = "https://github.com/$githubRepoName.git"
val githubIssueUrl = "https://github.com/$githubRepoName/issues"
configure(listOf(
project(":radar-expression-lang"),
project(":radar-app-config"),
project(":radar-app-config-core"),
project(":radar-app-config-client"),
project(":radar-expression-lang"),
)) {
apply(plugin = "org.radarbase.radar-kotlin")

radarKotlin {
javaVersion.set(Versions.java)
kotlinVersion.set(Versions.kotlin)
slf4jVersion.set(Versions.slf4j)
log4j2Version.set(Versions.log4j2)
junitVersion.set(Versions.junit)
}
}

project(":radar-expression-lang-antlr") {
apply(plugin = "java")
apply(plugin = "org.gradle.antlr")

subprojects {
repositories {
mavenCentral()
mavenLocal()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
}
tasks.withType<JavaCompile> {
options.release.set(17)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
languageVersion = "1.8"
apiVersion = "1.8"
}
}
afterEvaluate {
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
resolutionStrategy.cacheDynamicVersionsFor(0, TimeUnit.SECONDS)
}
}
}

project(":radar-expression-lang-antlr") {
tasks.withType<JavaCompile> {
options.release.set(11)
}
Expand All @@ -55,162 +51,29 @@ configure(listOf(
project(":radar-app-config-core"),
project(":radar-app-config-client"),
)) {
val myProject = this
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "maven-publish")
apply(plugin = "signing")

dependencies {
val dokkaVersion: String by project
val dokkaHtmlPlugin by configurations
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:$dokkaVersion")

val jacksonVersion: String by project
val dokkaPlugin by configurations
dokkaPlugin(platform("com.fasterxml.jackson:jackson-bom:$jacksonVersion"))
val dokkaRuntime by configurations
dokkaRuntime(platform("com.fasterxml.jackson:jackson-bom:$jacksonVersion"))

val jsoupVersion: String by project
dokkaPlugin("org.jsoup:jsoup:$jsoupVersion")
dokkaRuntime("org.jsoup:jsoup:$jsoupVersion")
}

tasks.withType<JavaCompile> {
options.release.set(11)
}

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
}
}

val sourcesJar by tasks.registering(Jar::class) {
from(myProject.the<SourceSetContainer>()["main"].allSource)
archiveClassifier.set("sources")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
val classes by tasks
dependsOn(classes)
}

val dokkaJar by tasks.registering(Jar::class) {
from("$buildDir/dokka/javadoc")
archiveClassifier.set("javadoc")
val dokkaJavadoc by tasks
dependsOn(dokkaJavadoc)
}

tasks.withType<Tar> {
compression = Compression.GZIP
archiveExtension.set("tar.gz")
}
apply(plugin = "org.radarbase.radar-publishing")

tasks.withType<Jar> {
manifest {
attributes(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version
)
}
radarKotlin {
javaVersion.set(17)
}

val assemble by tasks
assemble.dependsOn(sourcesJar)
assemble.dependsOn(dokkaJar)
radarPublishing {
val githubRepoName = "RADAR-base/radar-app-config"
githubUrl.set("https://github.com/$githubRepoName.git")

val mavenJar by publishing.publications.creating(MavenPublication::class) {
from(components["java"])

artifact(sourcesJar)
artifact(dokkaJar)

afterEvaluate {
pom {
name.set(myProject.name)
description.set(myProject.description)
url.set(githubUrl)
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
developers {
developer {
id.set("blootsvoets")
name.set("Joris Borgdorff")
email.set("joris@thehyve.nl")
organization.set("The Hyve")
}
developer {
id.set("nivemaham")
name.set("Nivethika Mahasivam")
email.set("nivethika@thehyve.nl")
organization.set("The Hyve")
}
}
issueManagement {
system.set("GitHub")
url.set(githubIssueUrl)
}
organization {
name.set("RADAR-base")
url.set("https://radar-base.org")
}
scm {
connection.set("scm:git:$githubUrl")
url.set(githubUrl)
}
developers {
developer {
id.set("blootsvoets")
name.set("Bastiaan de Graaf")
email.set("bastiaan@thehyve.nl")
organization.set("The Hyve")
}
}
}

signing {
useGpgCmd()
isRequired = true
sign(tasks["sourcesJar"], tasks["dokkaJar"])
sign(mavenJar)
}

tasks.withType<Sign> {
onlyIf { gradle.taskGraph.hasTask(myProject.tasks["publish"]) }
}
}

tasks.withType<DependencyUpdatesTask> {
doFirst {
allprojects {
repositories.removeAll {
it is MavenArtifactRepository && it.url.toString().endsWith("/snapshots")
developer {
id.set("nivemaham")
name.set("Nivethika Mahasivam")
email.set("nivethika@thehyve.nl")
organization.set("The Hyve")
}
}
}
val isStable = "(^[0-9,.v-]+(-r)?|RELEASE|FINAL|GA|-CE)$".toRegex(RegexOption.IGNORE_CASE)
rejectVersionIf {
!isStable.containsMatchIn(candidate.version)
}
}

fun Project.propertyOrEnv(propertyName: String, envName: String): String? {
return if (hasProperty(propertyName)) {
property(propertyName)?.toString()
} else {
System.getenv(envName)
}
}

nexusPublishing {
repositories {
sonatype {
username.set(propertyOrEnv("ossrh.user", "OSSRH_USER"))
password.set(propertyOrEnv("ossrh.password", "OSSRH_PASSWORD"))
}
}
}

tasks.wrapper {
gradleVersion = "8.0.2"
}
10 changes: 10 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.9.10"
}

repositories {
mavenCentral()
}
23 changes: 23 additions & 0 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
object Versions {
const val project = "0.5.1"

const val java = 17
const val kotlin = "1.9.23"
const val kotlinxSerialization = "1.6.3"

const val radarCommons = "1.1.2"
const val jackson = "2.15.2"
const val antlr = "4.13.1"
const val ktor = "2.3.11"
const val coroutines = "1.7.2"
const val radarJersey = "0.11.1"
const val log4j2 = "2.20.0"
const val slf4j = "2.0.13"
const val hazelcast = "5.4.0"
const val hazelcastHibernate = "5.1.0"
const val hazelcastKubernetes = "2.2.3"

const val junit = "5.9.3"
const val hamcrest = "2.2"
const val mockitoKotlin = "5.3.1"
}
Loading

0 comments on commit f1e2d05

Please sign in to comment.