Skip to content

Commit

Permalink
fix: compiler args (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
brizzbuzz authored Jan 12, 2022
1 parent 1452f53 commit 2f97edc
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
distribution: 'adopt'
java-version: '8'
- name: Unit Tests
- name: Publish to GitHub Packages
uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.4] - January 11th, 2022
### Changed
- Fixed bug where compiler args were not being applied

## [0.5.3] - January 11th, 2022
### Changed
- Fixed bug causing version in library to be null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ class ApplicationJvmPlugin : Plugin<Project> {
}

private fun Project.configureKotlin(ext: ApplicationJvmExtension) {
tasks.withType(KotlinCompile::class.java) {
it.sourceCompatibility = ext.jvmTarget.get()
it.kotlinOptions {
jvmTarget = ext.jvmTarget.get()
freeCompilerArgs = freeCompilerArgs + ext.compilerArgs.get()
afterEvaluate {
tasks.withType(KotlinCompile::class.java) {
it.sourceCompatibility = ext.jvmTarget.get()
it.kotlinOptions {
jvmTarget = ext.jvmTarget.get()
freeCompilerArgs = freeCompilerArgs + ext.compilerArgs.get()
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Project
project.version=0.5.3
project.version=0.5.4

# Kotlin
kotlin.code.style=official
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ class LibraryJvmPlugin : Plugin<Project> {
}

private fun Project.configureKotlin(ext: LibraryJvmExtension) {
tasks.withType(KotlinCompile::class.java) {
it.sourceCompatibility = ext.jvmTarget.get()
it.kotlinOptions {
jvmTarget = ext.jvmTarget.get()
freeCompilerArgs = freeCompilerArgs + ext.compilerArgs.get()
afterEvaluate {
tasks.withType(KotlinCompile::class.java) {
it.sourceCompatibility = ext.jvmTarget.get()
it.kotlinOptions {
jvmTarget = ext.jvmTarget.get()
freeCompilerArgs = freeCompilerArgs + ext.compilerArgs.get()
}
}
}
}
Expand Down

0 comments on commit 2f97edc

Please sign in to comment.