-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5419af8
commit d7430cf
Showing
10 changed files
with
314 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import org.gradle.api.DefaultTask | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.InputFile | ||
import org.gradle.api.tasks.InputDirectory | ||
import org.gradle.api.tasks.OutputFile | ||
import org.gradle.api.tasks.OutputDirectory | ||
import org.gradle.api.tasks.TaskAction | ||
import org.gradle.api.tasks.CacheableTask | ||
import org.gradle.api.tasks.PathSensitive | ||
import org.gradle.api.tasks.PathSensitivity | ||
|
||
@CacheableTask | ||
class JextractTask extends DefaultTask { | ||
@InputFile @PathSensitive(PathSensitivity.RELATIVE) File jextractBinary | ||
|
||
@InputDirectory @PathSensitive(PathSensitivity.RELATIVE) File includeDir | ||
|
||
@OutputDirectory File outputDir | ||
|
||
@TaskAction | ||
void generate() { | ||
logger.info("Generating using binary ${jextractBinary} from ${includeDir} to ${outputDir}...") | ||
def arguments = [ | ||
'--include-dir', includeDir, | ||
'--output', outputDir, | ||
'--target-package', 'org.itsallcode.luava.ffi', | ||
'--library', 'lua', | ||
'--header-class-name', 'Lua', | ||
"$includeDir/all_lua.h" | ||
] | ||
project.exec { | ||
workingDir project.rootDir | ||
executable jextractBinary | ||
args arguments | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
[versions] | ||
junit-jupiter = "5.11.0" | ||
junit-jupiter = "5.11.2" | ||
hamcrest = "3.0" | ||
mockito = "5.14.1" | ||
|
||
[libraries] | ||
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } | ||
hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" } | ||
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } | ||
mockito-junit = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.