Skip to content

Commit

Permalink
Print all tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 committed Jun 20, 2024
1 parent cc66328 commit 1d5e697
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions automation/code-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ dependencies {
implementation("io.ktor:ktor-client-content-negotiation")
implementation("io.ktor:ktor-serialization-kotlinx-json")
implementation("io.arrow-kt:arrow-fx-coroutines:1.2.4")
implementation("org.gradle:gradle-tooling-api:8.8")
runtimeOnly("org.slf4j:slf4j-simple:1.7.10")

implementation(projects.actionBindingGenerator)
implementation(projects.sharedInternal)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package io.github.typesafegithub.workflows

import org.gradle.tooling.GradleConnector
import org.gradle.tooling.model.GradleProject
import java.io.File

fun main() {
GradleConnector.newConnector()
.forProjectDirectory(File("/Users/piotr/repos/github-workflows-kt"))
.connect()
.use { gradleConnector ->
val model = gradleConnector.getModel(GradleProject::class.java)
val projects = model.children.all
projects.forEach { project ->
project.tasks.forEach { task ->
println(task)
}
}
}
}
1 change: 1 addition & 0 deletions buildSrc/repositories.settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencyResolutionManagement {
repositories {
mavenCentral()
gradlePluginPortal()
maven { url = uri("https://repo.gradle.org/gradle/libs-releases") }

// It has to be defined here because preferring repositories config in settings apparently removes the below
// additions done by Kotlin/JS plugin.
Expand Down

0 comments on commit 1d5e697

Please sign in to comment.