Fix inter-project dependency and including libs into algorithm jar.
This commit is contained in:
parent
0b044ab9a4
commit
a0447298d3
@ -8,9 +8,8 @@ plugins {
|
||||
|
||||
description = 'Master Password Algorithm Implementation'
|
||||
|
||||
task archive( type: Zip ) {
|
||||
dependsOn assemble
|
||||
|
||||
artifacts {
|
||||
'default' task( type: Zip, "archive" ) {
|
||||
components.withType( ComponentWithRuntimeFile ) {
|
||||
if (isOptimized()) {
|
||||
from getRuntimeFile()
|
||||
@ -19,6 +18,7 @@ task archive( type: Zip ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
library {
|
||||
linkage.set( [Linkage.STATIC, Linkage.SHARED] )
|
||||
@ -34,7 +34,6 @@ library {
|
||||
}
|
||||
}
|
||||
components.withType( CppComponent ) {
|
||||
// Reconfigure the toolchain from C++ to C.
|
||||
cppSource.from fileTree( dir: "src", include: "**/*.c" )
|
||||
}
|
||||
|
||||
@ -43,6 +42,7 @@ library {
|
||||
objects.named( OperatingSystemFamily, OperatingSystemFamily.LINUX ),
|
||||
objects.named( OperatingSystemFamily, OperatingSystemFamily.MAC_OS )] )
|
||||
|
||||
//
|
||||
binaries.configureEach {
|
||||
// Resolve a standard name for the platform.
|
||||
def platform = standardOperatingSystem( targetPlatform )
|
||||
|
@ -2,27 +2,29 @@ plugins {
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
|
||||
description = 'Master Password Algorithm Implementation'
|
||||
|
||||
configurations {
|
||||
resource
|
||||
lib
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation group: 'com.lyndir.lhunath.opal', name: 'opal-system', version: '1.7-p1'
|
||||
|
||||
api( group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.5' )
|
||||
api group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.5'
|
||||
api group: 'org.jetbrains', name: 'annotations', version: '13.0'
|
||||
api group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
|
||||
|
||||
// TODO: pending cross-compilation support
|
||||
//resource project( path: ':masterpassword-core', configuration: 'releaseSharedRuntimeElements' )
|
||||
lib project( path: ':masterpassword-core', configuration: 'default' )
|
||||
}
|
||||
|
||||
jar {
|
||||
dependsOn task( type: Sync, 'copyResources' ) {
|
||||
from files( configurations.resource )
|
||||
into processResources.outputs.files.singleFile
|
||||
processResources {
|
||||
dependsOn task( type: Sync, 'copyResources', {
|
||||
dependsOn configurations.lib {
|
||||
files.each { libFile ->
|
||||
from zipTree( libFile )
|
||||
into new File( processResources.outputs.files.singleFile, "lib" )
|
||||
}
|
||||
}
|
||||
} )
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class MPAlgorithmV0 extends MPAlgorithm {
|
||||
protected static final int AES_BLOCKSIZE = 128 /* bit */;
|
||||
|
||||
static {
|
||||
Native.load( MPAlgorithmV0.class, "mpw" );
|
||||
Native.load( MPAlgorithmV0.class, "masterpassword-core" );
|
||||
}
|
||||
|
||||
public final Version version = MPAlgorithm.Version.V0;
|
||||
|
@ -8,10 +8,11 @@ description = 'Master Password GUI'
|
||||
mainClassName = 'com.lyndir.masterpassword.gui.GUI'
|
||||
|
||||
dependencies {
|
||||
compile project( ':masterpassword-model' )
|
||||
implementation group: 'com.lyndir.lhunath.opal', name: 'opal-system', version: '1.7-p1'
|
||||
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.2'
|
||||
implementation group: 'com.yuvimasory', name: 'orange-extensions', version: '1.3.0'
|
||||
|
||||
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.2'
|
||||
compile group: 'com.yuvimasory', name: 'orange-extensions', version: '1.3.0'
|
||||
compile project( ':masterpassword-model' )
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user