Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,3 @@ Every public type ships with thorough JavaDoc:
The original in-depth reference, in French, is
[`scope/README.md`](scope/README.md).

## Developers

Check if dependencies are up to date:
```sh
./gradlew dependencyUpdates
```
87 changes: 9 additions & 78 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,85 +1,16 @@
plugins {
base
id("com.github.ben-manes.versions") version "0.54.0"
base
}

val defaultVersion = property("version").toString()
val resolvedVersion = if (System.getenv("GITHUB_REF_TYPE") == "tag") {
System.getenv("GITHUB_REF_NAME")
?.takeIf { it.startsWith("v") }
?.removePrefix("v")
?: defaultVersion
} else {
defaultVersion
}

allprojects {
group = "be.theking90000"
version = resolvedVersion

repositories {
mavenCentral()
}
}

subprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")

extensions.configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

withSourcesJar()
withJavadocJar()
val resolvedVersion =
if (System.getenv("GITHUB_REF_TYPE") == "tag") {
System.getenv("GITHUB_REF_NAME")?.takeIf { it.startsWith("v") }?.removePrefix("v")
?: defaultVersion
} else {
defaultVersion
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

extensions.configure<PublishingExtension> {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])

pom {
name = project.name
description = "Dependency injection utilities for Java."
url = "https://github.com/theking90000/scope"

licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
}
}

developers {
developer {
id = "theking90000"
name = "theking90000"
}
}

scm {
connection = "scm:git:git://github.com/theking90000/scope.git"
developerConnection = "scm:git:ssh://github.com/theking90000/scope.git"
url = "https://github.com/theking90000/scope"
}
}
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/theking90000/scope")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
allprojects {
version = resolvedVersion
}
7 changes: 7 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package be.theking90000.scope

plugins.withType<JavaPlugin> {
extensions.getByType<JavaPluginExtension>().apply {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package be.theking90000.scope

plugins {
`java-library`
id("be.theking90000.scope.java-base-conventions")
}

java {
withSourcesJar()
withJavadocJar()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package be.theking90000.scope

plugins {
`maven-publish`
}

extensions.configure<PublishingExtension> {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])

pom {
name = project.name
description = "Dependency injection utilities for Java."
url = "https://github.com/theking90000/scope"

licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
}
}

developers {
developer {
id = "theking90000"
name = "theking90000"
}
}

scm {
connection = "scm:git:git://github.com/theking90000/scope.git"
developerConnection = "scm:git:ssh://github.com/theking90000/scope.git"
url = "https://github.com/theking90000/scope"
}
}
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/theking90000/scope")

credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
9 changes: 7 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
org.gradle.jvmargs=-Xmx1g -Dfile.encoding=UTF-8
group=be.theking90000
version=1.0.0-SNAPSHOT
org.gradle.configuration-cache=true

org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configuration-cache=true
org.gradle.configuration-cache.parallel=true
org.gradle.jvmargs=-Xmx1g -Dfile.encoding=UTF-8
7 changes: 7 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[versions]
junit-bom = "6.1.0"

[libraries]
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit-bom" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" }
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading