Skip to content

Commit

Permalink
Merge pull request #12 from aSemy/fix/mingw
Browse files Browse the repository at this point in the history
Updates & Enable MinGW
  • Loading branch information
alllex authored Jun 24, 2023
2 parents f0afbd3 + 5dc1980 commit a5bceeb
Show file tree
Hide file tree
Showing 11 changed files with 357 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ insert_final_newline = true

[gradlew.bat]
end_of_line = crlf

[{*.yaml,*yml}]
indent_size = 2
24 changes: 19 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
name: Gradle build

on:
pull_request:
push:
branches: [ main ]
workflow_dispatch:

concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
gradle:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ] #, windows-latest ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: 8
distribution: zulu

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Cache Kotlin Konan
id: cache-kotlin-konan
uses: actions/cache@v3
with:
path: |
~/.konan/**/*
key: kotlin-konan-${{ runner.os }}

- name: Execute Gradle build
run: ./gradlew build --no-configuration-cache --no-daemon
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
arguments: build
8 changes: 4 additions & 4 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
buildsrc.conventions.`kotlin-jvm`
kotlin("plugin.allopen") version "1.8.10"
id("org.jetbrains.kotlinx.benchmark") version "0.4.6"
kotlin("plugin.allopen")
id("org.jetbrains.kotlinx.benchmark")
}

dependencies {
implementation(projects.parsus)
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.6")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0")
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.8")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
testImplementation(kotlin("test"))
}

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ kotlin {
commonTest {
dependencies {
implementation(kotlin("test"))
implementation("com.willowtreeapps.assertk:assertk:0.25")
implementation("com.willowtreeapps.assertk:assertk:0.26.1")
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ plugins {
}

dependencies {
val kotlinVer = "1.8.10"
val kotlinVer = "1.8.22"
implementation(platform(kotlin("bom", kotlinVer)))
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVer")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:$kotlinVer")
implementation("org.jetbrains.kotlin:kotlin-allopen:$kotlinVer")
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:0.4.8")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.8.20")
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kotlin {

linuxX64()

// mingwX64() // TODO find a workaround/replacement for AssertK missing a mingw variant
mingwX64()

macosX64()
macosArm64()
Expand Down Expand Up @@ -50,9 +50,9 @@ kotlin {
val linuxX64Main by getting { dependsOn(nativeMain) }
val linuxX64Test by getting { dependsOn(nativeTest) }

// // Windows - MinGW
// val mingwX64Main by getting { dependsOn(nativeMain) }
// val mingwX64Test by getting { dependsOn(nativeTest) }
// Windows - MinGW
val mingwX64Main by getting { dependsOn(nativeMain) }
val mingwX64Test by getting { dependsOn(nativeTest) }

// Apple - macOS
val macosArm64Main by getting { dependsOn(nativeMain) }
Expand Down
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx2g -XX:MaxMetaspaceSize=1g
org.gradle.parallel=true
org.gradle.caching=true
# Note that Kotlin/Multiplatform publishing is incompatible with CC, and should be disabled when publishing:
# ./gradlew publish --no-configuration-cache
org.gradle.unsafe.configuration-cache=true
# Kotlin/Multiplatform is incompatible with CC - can be re-enabled in Kotlin 1.9
org.gradle.unsafe.configuration-cache=false
org.gradle.unsafe.configuration-cache-problems=warn

kotlin.native.ignoreDisabledTargets=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 4 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Loading

0 comments on commit a5bceeb

Please sign in to comment.