Skip to content

Commit

Permalink
Merge pull request #4 from imanushin/updateGradle
Browse files Browse the repository at this point in the history
Update gradle
  • Loading branch information
imanushin authored Dec 13, 2023
2 parents 9d80a5c + 17b8fd8 commit e95ccb6
Show file tree
Hide file tree
Showing 6 changed files with 233 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v3

# https://github.com/marketplace/actions/setup-java-jdk
- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
Expand Down
21 changes: 8 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import org.gradle.jvm.tasks.Jar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

val kotlinJvmTarget = "13"
val jmhLibraryVersion = "1.23"
val applicationStartClass = "com.imanushin.use.performance.StartKt"

plugins {
application
kotlin("jvm") version "1.3.71"
id("me.champeau.gradle.jmh") version "0.5.0"
java
kotlin("jvm") version embeddedKotlinVersion
id("me.champeau.gradle.jmh") version "0.5.3"
id("com.github.ben-manes.versions") version "0.50.0"
}

kotlin {
jvmToolchain(11)
}

repositories {
Expand All @@ -20,21 +23,13 @@ dependencies {
}

tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = kotlinJvmTarget
}

create<Jar>("singleJar") {
manifest {
attributes("Main-Class" to applicationStartClass)
}
}
}

application {
mainClassName = applicationStartClass
}

// there are several issues with JMH plugin on Windows (it doesn't have fork method, so jmh tries to simulates that):
// 1. gradle daemons should be stopped before, so execute .\gradlew.bat --stop before
// 2. jmh plugin is unable to compile code incrementally, so execute .\gradlew.bat clean before
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit e95ccb6

Please sign in to comment.