File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
ktreesitter-plugin/src/main
java/io/github/treesitter/ktreesitter/plugin Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 4242 if : " !cancelled() && steps.ktlint.outcome == 'failure'"
4343 with :
4444 sarif_file : build/reports/ktlint.sarif
45+ # FIXME: github/codeql-action#2215
46+ checkout_path : ${{env.HOME}}
4547 category : ktlint
4648 detekt :
4749 runs-on : ubuntu-latest
@@ -55,12 +57,12 @@ jobs:
5557 java-version : 17
5658 - name : Install detekt
5759 run : |-
58- curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.6 /detekt-cli-1.23.6 -all.jar
59- mv detekt-cli-1.23.6 -all.jar $RUNNER_TOOL_CACHE/detekt-cli.jar
60+ curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.7 /detekt-cli-1.23.7 -all.jar
61+ mv detekt-cli-1.23.7 -all.jar $RUNNER_TOOL_CACHE/detekt-cli.jar
6062 - name : Run detekt
6163 id : detekt
6264 run : >-
63- java -jar $RUNNER_TOOL_CACHE/detekt-cli.jar --build-upon-default-config
65+ java -jar $RUNNER_TOOL_CACHE/detekt-cli.jar --build-upon-default-config \
6466 --jvm-target 17 -c .github/detekt.yml -r sarif:build/reports/detekt.sarif
6567 - name : Upload report
6668 uses : github/codeql-action/upload-sarif@v3
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ sdk.version.min=23
88# The Android NDK version that is used to compile the project.
99ndk.version =26.3.11579264
1010# The CMake version that is used to compile the project.
11- cmake.version =3.30.3
11+ cmake.version =3.30.5
1212
1313# Specifies the JVM arguments used for the daemon process.
1414org.gradle.jvmargs =-Xmx2048m -Dfile.encoding=UTF-8
Original file line number Diff line number Diff line change @@ -194,12 +194,16 @@ private void generateNative(Path srcDir) throws GradleException {
194194 );
195195 mkdirs (classFile .getParent ().toFile ());
196196
197+ var imports = languageMethods .values ().stream ().map (method ->
198+ "import %s.internal.%s" .formatted (packageName , method )
199+ );
197200 var methods = languageMethods .entrySet ().stream ().map (method ->
198201 " actual fun %s(): Any = %s()!!" .formatted (method .getKey (), method .getValue ())
199202 );
200203 var template = readResource ("native.kt.in" )
201204 .replace ("@PACKAGE@" , packageName )
202205 .replace ("@CLASS@" , className )
206+ .replace ("@IMPORTS@" , String .join ("\n \n " , imports .toList ()))
203207 .replace ("@METHODS@" , String .join ("\n \n " , methods .toList ()));
204208 writeFile (classFile .toFile (), template );
205209 }
Original file line number Diff line number Diff line change 22
33package @PACKAGE@
44
5- 5+ @IMPORTS@
66import kotlinx.cinterop.ExperimentalForeignApi
77
88@OptIn(ExperimentalForeignApi::class)
You can’t perform that action at this time.
0 commit comments