Skip to content

Commit 672a4a1

Browse files
authored
Merge branch 'master' into bugfix/typo-in-gitlab-pipeline-status
2 parents 855ecab + 6845294 commit 672a4a1

File tree

15 files changed

+50
-38
lines changed

15 files changed

+50
-38
lines changed

.github/workflows/ci.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: pull_request
55
jobs:
66
build:
77
strategy:
8+
fail-fast: false
89
matrix:
910
os: [ubuntu-latest, macos-latest]
1011

@@ -16,11 +17,11 @@ jobs:
1617
- uses: sdkman/sdkman-action@master
1718
with:
1819
candidate: gradle
19-
version: 7.4.2
20+
version: 8.10.2
2021

2122
- name: Install Kotlin
2223
run: |
23-
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.22/kotlin-compiler-1.7.22.zip
24+
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v2.0.21/kotlin-compiler-2.0.21.zip
2425
2526
if [[ "$OSTYPE" != "darwin"* ]]
2627
then
@@ -33,7 +34,7 @@ jobs:
3334
3435
- uses: actions/setup-node@v4
3536
with:
36-
node-version: '14'
37+
node-version: '22.10.0'
3738

3839
- name: Install libncurses5
3940
run: |
@@ -48,21 +49,20 @@ jobs:
4849
run: npm install -g danger
4950

5051
- name: Install Danger Kotlin
51-
run: make install
52-
52+
run: sudo make install
53+
5354
- name: Run tests
54-
run: ./gradlew danger-kotlin-library:test
55+
run: sudo ./gradlew danger-kotlin-library:test
5556

5657
- name: Install Plugin Installer
57-
run: ./gradlew danger-plugin-installer:publishToMavenLocal
58+
run: sudo ./gradlew danger-plugin-installer:publishToMavenLocal
5859

5960
- name: Build and Install Sample Plugin
61+
working-directory: ./danger-kotlin-sample-plugin
6062
run: |
61-
cd danger-kotlin-sample-plugin
62-
gradle wrapper
63-
./gradlew build
64-
./gradlew installDangerPlugin
65-
cd ..
63+
sudo gradle wrapper
64+
sudo ./gradlew build
65+
sudo ./gradlew installDangerPlugin
6666
6767
- name: Run Danger-Kotlin
6868
run: DEBUG='*' danger-kotlin ci --dangerfile Dangerfile_ci.df.kts

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LABEL "com.github.actions.description"="Runs Kotlin Dangerfiles"
77
LABEL "com.github.actions.icon"="zap"
88
LABEL "com.github.actions.color"="blue"
99

10-
ARG KOTLINC_VERSION="1.7.22"
10+
ARG KOTLINC_VERSION="2.0.21"
1111
ARG DANGER_KOTLIN_VERSION="1.3.1"
1212
ARG DANGER_JS_VERSION="11.3.1"
1313

danger-kotlin-kts/build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ compileTestKotlin {
3636
kotlinOptions.jvmTarget = "1.8"
3737
}
3838

39+
tasks.withType(JavaCompile).configureEach {
40+
sourceCompatibility = JavaVersion.VERSION_1_8
41+
targetCompatibility = JavaVersion.VERSION_1_8
42+
}
43+
3944
publishing {
4045
publications {
4146
maven(MavenPublication) {

danger-kotlin-library/build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ compileTestKotlin {
2828
kotlinOptions.jvmTarget = "1.8"
2929
}
3030

31+
tasks.withType(JavaCompile).configureEach {
32+
sourceCompatibility = JavaVersion.VERSION_1_8
33+
targetCompatibility = JavaVersion.VERSION_1_8
34+
}
35+
3136
publishing {
3237
publications {
3338
maven(MavenPublication) {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

danger-kotlin-sample-plugin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
plugins {
12-
id 'org.jetbrains.kotlin.jvm' version '1.7.22'
12+
id 'org.jetbrains.kotlin.jvm' version '2.0.21'
1313
}
1414

1515
apply plugin: 'danger-kotlin-plugin-installer'

danger-kotlin-sdk/build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ compileKotlin {
2121
compileTestKotlin {
2222
kotlinOptions.jvmTarget = "1.8"
2323
}
24+
25+
tasks.withType(JavaCompile).configureEach {
26+
sourceCompatibility = JavaVersion.VERSION_1_8
27+
targetCompatibility = JavaVersion.VERSION_1_8
28+
}

danger-kotlin-sdk/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Sun Nov 03 23:08:58 GMT 2019
2-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
33
distributionBase=GRADLE_USER_HOME
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists

danger-kotlin-sdk/maven-publish.gradle

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply from: file('../secrets.gradle')
22

33
task sourceJar(type: Jar) {
4-
classifier "sources"
4+
archiveClassifier.set("sources")
55
from sourceSets.main.allJava
66
}
77

88
task javadocJar(type: Jar, dependsOn: javadoc) {
9-
classifier "javadoc"
9+
archiveClassifier.set("javadoc")
1010
from javadoc.destinationDir
1111
}
1212

@@ -32,14 +32,8 @@ publishing {
3232
publications {
3333
maven(MavenPublication) {
3434
from components.java
35-
artifact sourceJar {
36-
classifier "sources"
37-
from sourceSets.main.allJava
38-
}
39-
artifact javadocJar {
40-
classifier "javadoc"
41-
from javadoc.destinationDir
42-
}
35+
artifact sourceJar
36+
artifact javadocJar
4337
pom {
4438
name = 'Danger Kotlin SDK'
4539
description = 'Develop your own plugin for Danger Kotlin'
@@ -81,4 +75,4 @@ publishing {
8175
}
8276
}
8377
}
84-
}
78+
}

danger-kotlin/build.gradle.kts

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ kotlin {
1414
"linuxX64" -> linuxX64("runner")
1515
"macosArm64" -> macosArm64("runner")
1616
"mingwX64" -> mingwX64("runner")
17-
else -> throw GradleException("OS '$osName' is not supported.") as Throwable
17+
else -> throw GradleException("OS '$osName' is not supported.")
1818
}
1919
} else {
2020
when (val osName = System.getProperty("os.name")) {
2121
"Mac OS X" -> macosX64("runner")
2222
"Linux" -> linuxX64("runner")
2323
"Mac OS X Apple silicon" -> macosArm64("runner")
2424
"Windows 11" -> mingwX64("runner")
25-
else -> throw GradleException("OS '$osName' is not supported.") as Throwable
25+
else -> throw GradleException("OS '$osName' is not supported.")
2626
}
2727
}
2828

@@ -44,5 +44,8 @@ kotlin {
4444
implementation(kotlin("test-annotations-common"))
4545
}
4646
}
47+
all {
48+
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
49+
}
4750
}
4851
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

dependencyVersions.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ project.ext.groupIdOkio = 'com.squareup.okio'
2020
project.ext.artifactIdOkio = 'okio'
2121

2222
// Kotlin
23-
project.ext.versionKotlin = '1.7.22'
23+
project.ext.versionKotlin = '2.0.21'
2424
project.ext.groupIdKotlin = 'org.jetbrains.kotlin'
2525
project.ext.groupIdKotlinx = 'org.jetbrains.kotlinx'
2626
project.ext.artifactIdKotlinMain = 'kotlin-main-kts'

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
kotlinVersion=1.7.22
1+
kotlinVersion=2.0.21
22
kotlin.code.style=official
33
systemProp.org.gradle.internal.publish.checksums.insecure=true
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

scripts/install.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ if [[ -n "$sudo" && "$OSTYPE" != "darwin"* ]]; then
3131
fi
3232

3333
if ! [[ -x "$(command -v kotlinc)" ]]; then
34-
echo "Installing kotlin compiler 1.7.22"
35-
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.22/kotlin-compiler-1.7.22.zip
34+
echo "Installing kotlin compiler 2.0.21"
35+
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v2.0.21/kotlin-compiler-2.0.21.zip
3636
unzip -d /usr/local/ kotlin-compiler.zip
3737
echo 'export PATH=/usr/local/kotlinc/bin:$PATH' >> ~/.bash_profile
3838
rm -rf kotlin-compiler.zip
3939
fi
4040

4141
if ! [[ -x "$(command -v gradle)" ]]; then
42-
echo "Installing gradle 7.4.2"
43-
curl -o gradle.zip -L https://downloads.gradle-dn.com/distributions/gradle-7.4.2-bin.zip
42+
echo "Installing gradle 8.10.2"
43+
curl -o gradle.zip -L https://downloads.gradle-dn.com/distributions/gradle-8.10.2-bin.zip
4444
mkdir /opt/gradle
4545
unzip -d /opt/gradle gradle.zip
46-
echo 'export PATH=/opt/gradle/gradle-7.4.2/bin:$PATH' >> ~/.bash_profile
46+
echo 'export PATH=/opt/gradle/gradle-8.10.2/bin:$PATH' >> ~/.bash_profile
4747
rm -rf gradle.zip
4848
fi
4949

0 commit comments

Comments
 (0)