Skip to content

Commit 678edb4

Browse files
committed
Upgrade Gradle Wrapper to 8.14.1 and update related configurations
Bump plugin version to 2025.9 in gradle.properties Update product descriptor release date and version Update .gitignore to exclude .kotlin directory Refactor directives to add self-referencing support.
1 parent e622c3d commit 678edb4

File tree

14 files changed

+170
-32
lines changed

14 files changed

+170
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,4 @@ build
145145
src/main/gen
146146
token.txt
147147
.intellijPlatform
148+
.kotlin

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2025.9 (May, 28, 2025)
2+
3+
* Fix recursive include directive processing
4+
* Update dependencies
5+
16
## 2025.8 (April, 20, 2025)
27

38
* Add suport directives:

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Gradle
2-
gradleVersion=8.12.1
2+
gradleVersion=8.14.1
33
org.gradle.parallel=true
44
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
55
org.gradle.configuration-cache=true
@@ -12,7 +12,7 @@ jvmVersion=17
1212
group=dev.meanmail
1313
repository=https://github.com/meanmail-dev/nginx-intellij-plugin
1414
pluginName=Nginx Configuration
15-
version=2025.8
15+
version=2025.9
1616
# https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
1717
kotlin.stdlib.default.dependency=false
1818
#

gradle/wrapper/gradle-wrapper.jar

130 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

gradlew.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

src/main/kotlin/dev/meanmail/directives/Common.kt

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ open class Directive(
6363
val children: MutableSet<Directive> = mutableSetOf()
6464

6565
init {
66-
if (context.isNotEmpty() && context.contains(any)) {
66+
if (context.contains(any)) {
6767
all.forEach { it.children.add(this) }
6868
}
69+
if (context.contains(self)) {
70+
this.children.add(this)
71+
}
6972
context.forEach { it.children.add(this) }
7073
module.directives.add(this)
7174
}
@@ -89,7 +92,16 @@ open class Directive(
8992
if (path.size == 1) {
9093
return true
9194
}
92-
if (context.any { it.isAllowedPath(path.subList(0, path.size - 1)) }) {
95+
val subPath = path.subList(0, path.size - 1)
96+
if (context.contains(any)) {
97+
return all.any { it.isAllowedPath(subPath) }
98+
}
99+
if (context.any {
100+
if (it == self) {
101+
return this.isAllowedPath(subPath)
102+
}
103+
it.isAllowedPath(subPath)
104+
}) {
93105
return true
94106
}
95107
return false
@@ -205,25 +217,6 @@ open class Directive(
205217
}
206218
}
207219

208-
class RecursiveDirective(
209-
name: String,
210-
description: String,
211-
parameters: List<DirectiveParameter>,
212-
context: List<Directive>,
213-
module: NginxModule
214-
) : Directive(
215-
name,
216-
description,
217-
parameters,
218-
context,
219-
module
220-
) {
221-
init {
222-
// Add itself as a potential child to support recursion
223-
this.children.add(this)
224-
}
225-
}
226-
227220
class ToggleDirective(
228221
name: String,
229222
description: String,
@@ -268,6 +261,14 @@ val any = Directive(
268261
main_module
269262
)
270263

264+
val self = Directive(
265+
"self",
266+
"Directive for self-referencing contexts",
267+
emptyList(),
268+
emptyList(),
269+
main_module
270+
)
271+
271272
val main = Directive(
272273
"main",
273274
"Top-level directives that cannot be nested",

src/main/kotlin/dev/meanmail/directives/nginx/http/ngx_http_core_module.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ val server = Directive(
4040
module = ngx_http_core_module
4141
)
4242

43-
val location = RecursiveDirective(
43+
val location = Directive(
4444
"location",
4545
description = "Location directives are used to control the behavior of a single location in a server block.",
4646
parameters = listOf(
@@ -51,7 +51,7 @@ val location = RecursiveDirective(
5151
required = true
5252
)
5353
),
54-
context = listOf(server),
54+
context = listOf(server, self),
5555
module = ngx_http_core_module
5656
)
5757

0 commit comments

Comments
 (0)