Skip to content

Commit 3cb6bb0

Browse files
committed
Drop support for versions lower than 7.5.1
1 parent f9aed90 commit 3cb6bb0

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
strategy:
77
matrix:
88
config:
9-
- {os: ubuntu-latest, params: "'-PtestedGradleVersion=6.6|7.0|7.5.1' pnpmTests" }
10-
- {os: ubuntu-latest, params: "'-PtestedGradleVersion=6.6|7.0|7.5.1' build" }
9+
- {os: ubuntu-latest, params: "'-PtestedGradleVersion=7.5.1|8.1.1' pnpmTests" }
10+
- {os: ubuntu-latest, params: "'-PtestedGradleVersion=7.5.1|8.1.1' build" }
1111
- {os: windows-latest, params: "build pnpmTests" }
1212
- {os: macos-latest, params: "build pnpmTests" }
1313
steps:

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Version 4.x *(unreleased)*
44

55
## Version 4.0.0 *(unreleased)*
6-
* Drop support for versions lower than Gradle 6.6
6+
* Drop support for versions lower than Gradle 7.5.1
77
* Rename `package.json` extension to `packageJson` [#232](https://github.com/node-gradle/gradle-node-plugin/issues/232)
88

99
## Version 3.6.0 *(2023-04-20)*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ with Gradle:
1818
The plugin is published in the [Gradle plugins portal](https://plugins.gradle.org/plugin/com.github.node-gradle.node)
1919
with the `com.github.node-gradle.node` identifier.
2020

21-
It supports Gradle 6.6+ and Node.js 10+, for 5.6.4 support use version 3.x
21+
It supports Gradle 7.5.1+ and Node.js 10+, for Gradle 5.6.4 support use version 3.x
2222

2323
## Documentation
2424

src/main/kotlin/com/github/gradle/node/NodePlugin.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ import org.gradle.kotlin.dsl.create
2121
import org.gradle.kotlin.dsl.named
2222
import org.gradle.kotlin.dsl.of
2323
import org.gradle.kotlin.dsl.register
24+
import org.gradle.util.GradleVersion
2425
import java.io.File
2526

2627
class NodePlugin : Plugin<Project> {
2728
private lateinit var project: Project
2829

2930
override fun apply(project: Project) {
31+
if (GradleVersion.current() < MINIMAL_SUPPORTED_GRADLE_VERSION) {
32+
project.logger.error("This version of the plugin requires $MINIMAL_SUPPORTED_GRADLE_VERSION or newer.")
33+
}
3034
this.project = project
3135
val nodeExtension = NodeExtension.create(project)
3236
project.extensions.create<PackageJsonExtension>(PackageJsonExtension.NAME, project)
@@ -150,6 +154,7 @@ class NodePlugin : Plugin<Project> {
150154
}
151155

152156
companion object {
157+
val MINIMAL_SUPPORTED_GRADLE_VERSION: GradleVersion = GradleVersion.version("7.5.1")
153158
const val NODE_GROUP = "Node"
154159
const val NPM_GROUP = "npm"
155160
const val PNPM_GROUP = "pnpm"

src/main/kotlin/com/github/gradle/node/util/ProjectApiHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import java.io.ByteArrayOutputStream
1515
import java.io.File
1616
import javax.inject.Inject
1717

18-
@Deprecated(message = "Only 6.6 and newer is supported")
18+
@Deprecated(message = "Only 7.5.1 and newer is supported")
1919
interface ProjectApiHelper {
2020
companion object {
2121
@JvmStatic

0 commit comments

Comments
 (0)