Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/typo-in-gitlab-pipeline-status
Browse files Browse the repository at this point in the history
  • Loading branch information
Vacxe authored Oct 18, 2024
2 parents 855ecab + 6845294 commit 672a4a1
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 38 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: pull_request
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

Expand All @@ -16,11 +17,11 @@ jobs:
- uses: sdkman/sdkman-action@master
with:
candidate: gradle
version: 7.4.2
version: 8.10.2

- name: Install Kotlin
run: |
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.22/kotlin-compiler-1.7.22.zip
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v2.0.21/kotlin-compiler-2.0.21.zip
if [[ "$OSTYPE" != "darwin"* ]]
then
Expand All @@ -33,7 +34,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '22.10.0'

- name: Install libncurses5
run: |
Expand All @@ -48,21 +49,20 @@ jobs:
run: npm install -g danger

- name: Install Danger Kotlin
run: make install
run: sudo make install

- name: Run tests
run: ./gradlew danger-kotlin-library:test
run: sudo ./gradlew danger-kotlin-library:test

- name: Install Plugin Installer
run: ./gradlew danger-plugin-installer:publishToMavenLocal
run: sudo ./gradlew danger-plugin-installer:publishToMavenLocal

- name: Build and Install Sample Plugin
working-directory: ./danger-kotlin-sample-plugin
run: |
cd danger-kotlin-sample-plugin
gradle wrapper
./gradlew build
./gradlew installDangerPlugin
cd ..
sudo gradle wrapper
sudo ./gradlew build
sudo ./gradlew installDangerPlugin
- name: Run Danger-Kotlin
run: DEBUG='*' danger-kotlin ci --dangerfile Dangerfile_ci.df.kts
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL "com.github.actions.description"="Runs Kotlin Dangerfiles"
LABEL "com.github.actions.icon"="zap"
LABEL "com.github.actions.color"="blue"

ARG KOTLINC_VERSION="1.7.22"
ARG KOTLINC_VERSION="2.0.21"
ARG DANGER_KOTLIN_VERSION="1.3.1"
ARG DANGER_JS_VERSION="11.3.1"

Expand Down
5 changes: 5 additions & 0 deletions danger-kotlin-kts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}

tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

publishing {
publications {
maven(MavenPublication) {
Expand Down
5 changes: 5 additions & 0 deletions danger-kotlin-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}

tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

publishing {
publications {
maven(MavenPublication) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion danger-kotlin-sample-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

plugins {
id 'org.jetbrains.kotlin.jvm' version '1.7.22'
id 'org.jetbrains.kotlin.jvm' version '2.0.21'
}

apply plugin: 'danger-kotlin-plugin-installer'
Expand Down
5 changes: 5 additions & 0 deletions danger-kotlin-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ compileKotlin {
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}

tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
2 changes: 1 addition & 1 deletion danger-kotlin-sdk/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Sun Nov 03 23:08:58 GMT 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
16 changes: 5 additions & 11 deletions danger-kotlin-sdk/maven-publish.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply from: file('../secrets.gradle')

task sourceJar(type: Jar) {
classifier "sources"
archiveClassifier.set("sources")
from sourceSets.main.allJava
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
archiveClassifier.set("javadoc")
from javadoc.destinationDir
}

Expand All @@ -32,14 +32,8 @@ publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
from sourceSets.main.allJava
}
artifact javadocJar {
classifier "javadoc"
from javadoc.destinationDir
}
artifact sourceJar
artifact javadocJar
pom {
name = 'Danger Kotlin SDK'
description = 'Develop your own plugin for Danger Kotlin'
Expand Down Expand Up @@ -81,4 +75,4 @@ publishing {
}
}
}
}
}
7 changes: 5 additions & 2 deletions danger-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ kotlin {
"linuxX64" -> linuxX64("runner")
"macosArm64" -> macosArm64("runner")
"mingwX64" -> mingwX64("runner")
else -> throw GradleException("OS '$osName' is not supported.") as Throwable
else -> throw GradleException("OS '$osName' is not supported.")
}
} else {
when (val osName = System.getProperty("os.name")) {
"Mac OS X" -> macosX64("runner")
"Linux" -> linuxX64("runner")
"Mac OS X Apple silicon" -> macosArm64("runner")
"Windows 11" -> mingwX64("runner")
else -> throw GradleException("OS '$osName' is not supported.") as Throwable
else -> throw GradleException("OS '$osName' is not supported.")
}
}

Expand All @@ -44,5 +44,8 @@ kotlin {
implementation(kotlin("test-annotations-common"))
}
}
all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
}
2 changes: 1 addition & 1 deletion danger-kotlin/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion dependencyVersions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ project.ext.groupIdOkio = 'com.squareup.okio'
project.ext.artifactIdOkio = 'okio'

// Kotlin
project.ext.versionKotlin = '1.7.22'
project.ext.versionKotlin = '2.0.21'
project.ext.groupIdKotlin = 'org.jetbrains.kotlin'
project.ext.groupIdKotlinx = 'org.jetbrains.kotlinx'
project.ext.artifactIdKotlinMain = 'kotlin-main-kts'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
kotlinVersion=1.7.22
kotlinVersion=2.0.21
kotlin.code.style=official
systemProp.org.gradle.internal.publish.checksums.insecure=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ if [[ -n "$sudo" && "$OSTYPE" != "darwin"* ]]; then
fi

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

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

Expand Down

0 comments on commit 672a4a1

Please sign in to comment.