Skip to content

Commit

Permalink
Replace javac to use gradle native config
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeepbn committed Oct 7, 2021
1 parent 9285c10 commit f690e90
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions circe-checksum/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ dependencies {
testImplementation depLibs.mockito
}

task generateJniHeaders(type:Exec) {
task generateJniHeaders(type: JavaCompile) {
ext {
javahOutputDir = "$buildDir/javahGenerated"
}
dependsOn classes
def classpath = sourceSets.main.output.classesDirs.join(":")
commandLine("javac", "-h", javahOutputDir, "-classpath",
classpath, "./src/main/java/com/scurrilous/circe/crc/Sse42Crc32C.java")
classpath = sourceSets.main.compileClasspath
destinationDir file("${buildDir}/javahGenerated")
source = sourceSets.main.java
options.compilerArgs += [
'-h', file("${buildDir}/javahGenerated"),
]

options.annotationProcessorPath = configurations.annotationProcessor
}

jar {
Expand Down

0 comments on commit f690e90

Please sign in to comment.