-
-
Notifications
You must be signed in to change notification settings - Fork 304
Using Kotlin with the Bnd Gradle Plugin for Workspace Builds
Kotlin is a statically typed language that runs on the JVM. There is a Gradle plugin to compile Kotlin source using the Gradle build tool.
In order to use Kotlin source code with the Bnd Gradle Plugin for Workspace Builds, you will need to establish the proper compile dependencies for the compileKotlin task. The Bnd Gradle Plugin for Workspace Builds sets up the proper compile dependencies for the compileJava task, but the compileKotlin task does not depend upon the compileJava. In fact, it is the other way around. The Kotlin Gradle plugin has the compileJava task depend upon the compileKotlin task. This means that the compileKotlin task will not have the proper compile dependencies on other Bnd projects.
This can be easily fixed in your gradle scripts but adding the proper dependencies to the compileKotlin task:
bnd.project.getDependson()*.getName().each { dependency ->
compileKotlin.dependsOn(":${dependency}:assemble")
}This can be done in a project's build.gradle file for projects with Kotlin source code or it can be done in the base build.gradle for multi-project builds in a subprojects block.
Latest Releases
all versions
- 7.1.0 | 7.0.0
- 6.4.1 | 6.4.0 | 6.3.1 | 6.3.0
- 6.2.0 | 6.1.0 | 6.0.0
- 5.3.0 | 5.2.0 | 5.1.2 | 5.1.1
- 5.1.0 | 5.0.1 | 5.0.0
- 4.3.1 | 4.3.0 | 4.2.1 | 4.2.0
- 4.1.0 | 4.0.0
- 3.5.0 | 3.4.0 | 3.3.0 | 3.2.0
- 2.2.0
Gradle
- Plugin
- Build Customizations
- Builder & java-library
- Non-Workspace builds
- PluginManagement
- Using Kotlin
- Kotlin DSL jar config
- AntTasks
- Baselining [beta]
- Blurry Form Text on High-Resolution Displays
- Bnd toolchain parity table
- bnddistribute
- Buildpath Versions
- Conflict with M2E PDE Connector
- Eclipse Logging with Logback
- Hackathon June 2012
- Install bnd on the command line
- Is there a mailing list for bnd
- Launching Framework
- Multi-project build order
- Multi-release JAR support design discussion
- Plans wrt to enRoute
- Reading Eclipse project preferences in bnd
- Release Process
- Requirements for New Repository API
- Windows Locked Files
- WIP ideas ‐ bnd 8.0.0 breaking changes
- XML Attributes on Annotations
- [ant] Loading and Expanding Shared Headers or Properties