Skip to content

Commit

Permalink
Refactor Gradle build layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ryru committed Sep 14, 2024
1 parent 14d288b commit 884fac6
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 55 deletions.
10 changes: 5 additions & 5 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("ch.addere.dga.kotlin-application-conventions")
id("dga.application-conventions")
}

description = "CLI application project"
Expand Down
8 changes: 0 additions & 8 deletions build-logic/settings.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 3 additions & 4 deletions build-logic/build.gradle.kts → buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ repositories {
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0")
implementation("com.gradle.publish:plugin-publish-plugin:1.3.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20")
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
jvmToolchain(21)
}
1 change: 1 addition & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "buildSrc"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
id("dga.common-conventions")
application
}
4 changes: 4 additions & 0 deletions buildSrc/src/main/kotlin/dga.library-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
id("dga.common-conventions")
`java-library`
}
5 changes: 5 additions & 0 deletions buildSrc/src/main/kotlin/dga.plugin-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins {
id("dga.common-conventions")
`java-gradle-plugin`
id("com.gradle.plugin-publish")
}
18 changes: 1 addition & 17 deletions connector-model/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
plugins {
id("ch.addere.dga.kotlin-library-conventions")
`maven-publish`
id("dga.library-conventions")
}

description = "Data model of the analysed Gradle project"

group = "ch.addere.dga.connectormodel"
version = property("connectorPluginVersion").toString()

publishing {
repositories {
maven {
name = "pluginRepo"
url = uri(layout.projectDirectory.dir("../build/pluginRepo"))
}

publications {
create<MavenPublication>("maven") {
from(components["kotlin"])
}
}
}
}
4 changes: 1 addition & 3 deletions connector-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
plugins {
id("ch.addere.dga.kotlin-library-conventions")
`java-gradle-plugin`
id("com.gradle.plugin-publish") version "1.3.0"
id("dga.plugin-conventions")
}

description = "Gradle plugin that is injected into to be analysed Gradle projects"
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("ch.addere.dga.kotlin-library-conventions")
id("dga.library-conventions")
}

description = "Core logic for analysing dependency graphs"
2 changes: 1 addition & 1 deletion importer/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id("ch.addere.dga.kotlin-library-conventions")
id("dga.library-conventions")
`java-gradle-plugin`
}

Expand Down
6 changes: 1 addition & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
pluginManagement {
includeBuild("build-logic")
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
}

rootProject.name = "dependency-graph-analyser"
Expand Down

0 comments on commit 884fac6

Please sign in to comment.