Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-pr-idea-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build:
strategy:
matrix:
ij_sdk: [IJ193, IJ201, IJ202, IJ203, IJ211, IJ212, IJ213]
ij_sdk: [IJ193, IJ201, IJ202, IJ203, IJ211, IJ212, IJ213, IJ233, IJ241]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ij_sdk: [IJ193, IJ201, IJ202, IJ203, IJ211, IJ212, IJ213]
ij_sdk: [IJ193, IJ201, IJ202, IJ203, IJ211, IJ212, IJ213, IJ233, IJ241]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ reckon {
allprojects {
repositories {
mavenCentral()
jcenter()
}

if (Files.exists(Paths.get("$rootDir/local.properties"))) {
Expand All @@ -37,8 +36,8 @@ allprojects {
tasks.withType<KotlinCompile<*>> {
if (this is KotlinJvmCompile) {
kotlinOptions {
apiVersion = "1.3"
jvmTarget = "1.8"
apiVersion = "1.4"
jvmTarget = JavaVersion.VERSION_17.toString()
}
} else {
kotlinOptions {
Expand Down
9 changes: 5 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
`java-gradle-plugin`
`kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
id("com.github.johnrengelman.shadow") version "8.1.1"
}

repositories {
Expand All @@ -10,9 +11,9 @@ repositories {
}

dependencies {
api(kotlin("gradle-plugin", version = "1.5.31"))
api(kotlin("gradle-plugin", version = "1.9.21"))
api("org.jetbrains.dokka:dokka-gradle-plugin:0.9.17")
api("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4")
api("org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.4.0")
api("com.github.jengelman.gradle.plugins:shadow:4.0.2")
api("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5")
api("org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.16.+")
api("org.apache.ant:ant:1.10.13") // needed for shadow jar zip
}
5 changes: 4 additions & 1 deletion buildSrc/src/main/kotlin/ij/BuildConfig.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package ij

import org.gradle.api.JavaVersion

data class VersionRange(val since: String, val until: String)

data class BuildConfig(
val sdk: String,
val prefix: String,
val extraSource: String,
val version: VersionRange,
val deps: List<String> = emptyList()
val deps: List<String> = emptyList(),
val javaVersion: JavaVersion = JavaVersion.VERSION_17
)
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
kotlin.incremental=true
org.gradle.parallel=true
reckon.scope=patch
reckon.scope=patch
kotlin.stdlib.default.dependency=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,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
33 changes: 15 additions & 18 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 7 additions & 18 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions integration-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib"))
// implementation(kotlin("stdlib"))
}
}

Expand All @@ -32,7 +32,7 @@ kotlin {
jvm {
compilations["main"].defaultSourceSet {
dependencies {
implementation(kotlin("stdlib-jdk8"))
// implementation(kotlin("stdlib-jdk8"))
}
}

Expand Down Expand Up @@ -142,6 +142,6 @@ tasks {
// the spek-runtime and compiler plugin projects, rather than trying to download the not-yet-published version from a Maven repository.
configurations.forEach {
it.resolutionStrategy.dependencySubstitution {
substitute(module("org.spekframework.spek2:spek-runtime")).with(project(":spek-runtime"))
substitute(module("org.spekframework.spek2:spek-runtime")).using(project(":spek-runtime"))
}
}
10 changes: 5 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
enableFeaturePreview("GRADLE_METADATA")

rootProject.name = "spek"

includeBuild("./spek-gradle-plugin") {
dependencySubstitution {
substitute(module("org.spekframework.spek2:spek-gradle-plugin:0.1.0")).with(project(":"))
substitute(module("org.spekframework.spek2:spek-gradle-plugin:0.1.0")).using(project(":"))
}
}

Expand All @@ -30,5 +28,7 @@ if (excludeIdePlugins == null) {
include("spek-ide-plugin-intellij-base")
include("spek-ide-plugin-intellij-base-jvm")
include("spek-ide-plugin-intellij-idea")
include("spek-ide-plugin-android-studio")
}
// include("spek-ide-plugin-android-studio")
}


8 changes: 4 additions & 4 deletions spek-dsl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
// implementation(kotlin("stdlib-common"))
}
}

jvm {
compilations["main"].defaultSourceSet {
dependencies {
implementation(kotlin("stdlib-jdk8"))
// implementation(kotlin("stdlib-jdk8"))
}
}
}

js {
compilations["main"].defaultSourceSet {
dependencies {
implementation(kotlin("stdlib-js"))
// implementation(kotlin("stdlib-js"))
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions spek-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ plugins {

buildscript {
dependencies {
classpath(kotlin("gradle-plugin", version = "1.5.31"))
classpath(kotlin("gradle-plugin", version = "1.9.21"))
}
}

repositories {
jcenter()
mavenCentral()
}

reckon {
Expand All @@ -32,7 +32,7 @@ gradlePlugin {
val autoService = "com.google.auto.service:auto-service:1.0-rc4"

dependencies {
implementation(kotlin("stdlib"))
// implementation(kotlin("stdlib"))
implementation(kotlin("gradle-plugin"))
implementation(kotlin("gradle-plugin-api"))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
package org.spekframework.spek2.gradle.kotlin

import com.google.auto.service.AutoService
import org.gradle.api.Project
import org.gradle.api.tasks.compile.AbstractCompile
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
import org.gradle.api.provider.Provider
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
import org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerPluginSupportPlugin
import org.jetbrains.kotlin.gradle.plugin.SubpluginArtifact
import org.jetbrains.kotlin.gradle.plugin.SubpluginOption
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink
import org.spekframework.spek2.gradle.entry.MultiplatformPlugin
import org.spekframework.spek2.gradle.domain.MultiplatformExtension
import org.spekframework.spek2.gradle.entry.MultiplatformPlugin

class Subplugin : KotlinGradleSubplugin<AbstractCompile> {
override fun apply(project: Project, kotlinCompile: AbstractCompile, javaCompile: AbstractCompile?, variantData: Any?, androidProjectHandler: Any?, kotlinCompilation: KotlinCompilation<KotlinCommonOptions>?): List<SubpluginOption> {
val extension = checkNotNull(project.extensions.findByType(MultiplatformExtension::class.java))
class Subplugin : KotlinCompilerPluginSupportPlugin {
override fun applyToCompilation(kotlinCompilation: KotlinCompilation<*>): Provider<List<SubpluginOption>> {
val extension = checkNotNull(kotlinCompilation.target.project.extensions.findByType(MultiplatformExtension::class.java))

return listOf(SubpluginOption("enabled", extension.enabled.toString()))
return kotlinCompilation.target.project.provider {
listOf(SubpluginOption("enabled", extension.enabled.toString()))
}
}

override fun getCompilerPluginId(): String {
Expand All @@ -35,14 +32,8 @@ class Subplugin : KotlinGradleSubplugin<AbstractCompile> {
)
}

override fun getNativeCompilerPluginArtifact(): SubpluginArtifact? {
return SubpluginArtifact(
MultiplatformPlugin.spekMavenGroup,
"spek-kotlin-compiler-plugin-native",
MultiplatformPlugin.spekVersion
)
override fun isApplicable(kotlinCompilation: KotlinCompilation<*>): Boolean {
return kotlinCompilation.target.project.plugins.hasPlugin(MultiplatformPlugin::class.java)
// && (task is KotlinNativeCompile || task is KotlinNativeLink)
}

override fun isApplicable(project: Project, task: AbstractCompile): Boolean
= project.plugins.hasPlugin(MultiplatformPlugin::class.java) && (task is KotlinNativeCompile || task is KotlinNativeLink)
}
Loading