Skip to content

brief detects Java project with Kotlin-based Gradle build file as Kotlin #84

@skagedal

Description

@skagedal

Create a new Gradle project (I'm using Gradle 9.5.1 here), select "Java" as implementation language and "Kotlin" as build script DSL.

/tmp/test-gradle % gradle init
Starting a Gradle Daemon (subsequent builds will be faster)

Select type of build to generate:
  1: Application
  2: Library
  3: Gradle plugin
  4: Basic (build structure only)
Enter selection (default: Application) [1..4] 1

Select implementation language:
  1: Java
  2: Kotlin
  3: Groovy
  4: Scala
  5: C++
  6: Swift
Enter selection (default: Java) [1..6] 1

Enter target Java version (min: 7, default: 21):

Project name (default: test-gradle):

Select application structure:
  1: Single application project
  2: Application and library project
Enter selection (default: Single application project) [1..2]

Select build script DSL:
  1: Kotlin
  2: Groovy
Enter selection (default: Kotlin) [1..2]

Select test framework:
  1: JUnit 4
  2: TestNG
  3: Spock
  4: JUnit Jupiter
Enter selection (default: JUnit Jupiter) [1..4]

Generate build using new APIs and behavior (some features may change in the next minor release)? (default: no) [yes, no]


> Task :init
Learn more about Gradle by exploring our Samples at https://docs.gradle.org/9.5.1/samples/sample_building_java_applications.html

BUILD SUCCESSFUL in 34s
1 actionable task: 1 executed

Run brief:

/tmp/test-gradle % brief --version
brief 0.7.0
/tmp/test-gradle % brief
brief 0.7.0 — /tmp/test-gradle

Language:        Kotlin
Package Manager: Gradle (gradle build)


Style:       4-space (inferred)  LF
Layout:      source: app/

33.0ms  488 files checked  2/524 tools matched

For a Java project with Groovy build script, it instead detects no language:

/tmp/test-gradle-groovy % brief
brief 0.7.0 — /tmp/test-gradle-groovy



Style:       4-space (inferred)  LF
Layout:      source: app/

34.2ms  463 files checked  0/524 tools matched

test-gradle-groovy.tar.gz
test-gradle.tar.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions