Support for building with JDK 10.
This commit is contained in:
		@@ -1,3 +1,4 @@
 | 
			
		||||
org.gradle.daemon=true
 | 
			
		||||
org.gradle.configureondemand=true
 | 
			
		||||
org.gradle.jvmargs=-Xmx1536M
 | 
			
		||||
android.enableD8.desugaring=true
 | 
			
		||||
 
 | 
			
		||||
@@ -24,6 +24,7 @@
 | 
			
		||||
# target_prepare() { make -s distclean; }
 | 
			
		||||
# target_configure() { _target_configure "$@" --enable-minimal; }
 | 
			
		||||
set -e
 | 
			
		||||
PATH+=:/usr/local/bin
 | 
			
		||||
 | 
			
		||||
# needs <binary> ...
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "mpw-jni.h"
 | 
			
		||||
#include "java/com_lyndir_masterpassword_impl_MPAlgorithmV0.h"
 | 
			
		||||
 | 
			
		||||
#include "mpw-algorithm.h"
 | 
			
		||||
#include "mpw-util.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,6 +4,11 @@ plugins {
 | 
			
		||||
 | 
			
		||||
description = 'Master Password Algorithm Implementation'
 | 
			
		||||
 | 
			
		||||
tasks.withType( JavaCompile ) {
 | 
			
		||||
    // Native headers
 | 
			
		||||
    options.compilerArgs += ["-h", new File( new File( project( ':masterpassword-core' ).projectDir, 'src' ), 'java' ).absolutePath]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
configurations {
 | 
			
		||||
    lib
 | 
			
		||||
}
 | 
			
		||||
@@ -24,17 +29,7 @@ processResources {
 | 
			
		||||
        into new File( processResources.outputs.files.singleFile, "lib" )
 | 
			
		||||
 | 
			
		||||
        dependsOn configurations.lib {
 | 
			
		||||
            files.each { libFile ->
 | 
			
		||||
                from( zipTree( libFile ) )
 | 
			
		||||
            }
 | 
			
		||||
            files.each { libFile -> from( zipTree( libFile ) ) }
 | 
			
		||||
        }
 | 
			
		||||
    } )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
compileJava {
 | 
			
		||||
    doLast {
 | 
			
		||||
        ant.javah( class: 'com.lyndir.masterpassword.impl.MPAlgorithmV0',
 | 
			
		||||
                   outputFile: new File( project( ':masterpassword-core' ).projectDir, 'src/mpw-jni.h' ),
 | 
			
		||||
                   classpath: files( sourceSets.main.compileClasspath, sourceSets.main.output ).asPath )
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -36,5 +36,5 @@ shadowJar {
 | 
			
		||||
 | 
			
		||||
run {
 | 
			
		||||
    // I don't fully understand why this is necessary, but without it -Dmp.log.level is lost.
 | 
			
		||||
    systemProperties = System.properties
 | 
			
		||||
    //systemProperties = System.properties
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user