Configure build.grade
* build shared and static libraries * produce library artifacts * produce general (empty) artifact that enforces dependencies * update naming of library in artifact
This commit is contained in:
11
.gitignore
vendored
11
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
/build/
|
||||
/bin/
|
||||
/.gradle
|
||||
/.settings
|
||||
/.classpath
|
||||
build
|
||||
bin
|
||||
.gradle
|
||||
.settings
|
||||
.classpath
|
||||
.maven
|
||||
|
||||
26
build.gradle
26
build.gradle
@@ -5,7 +5,7 @@ apply plugin: 'eclipse'
|
||||
|
||||
group = 'com.github.boukefalos'
|
||||
project.archivesBaseName = 'libwiiuse'
|
||||
version = '0.13'
|
||||
version = '0.14'
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
gradleVersion = '1.12'
|
||||
@@ -75,7 +75,6 @@ libraries {
|
||||
lib library: 'SetupAPI', linkage: 'static'
|
||||
lib library: 'WS2_32', linkage: 'static'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,8 +115,29 @@ binaries.withType(SharedLibraryBinary) { binary ->
|
||||
jniPom.scopeMappings.mappings.clear()
|
||||
}
|
||||
def builderTask = binary.tasks.builder
|
||||
nativeJar.into(project.group.replace('.', '/') + '/' + variantName) { from builderTask.outputFile }
|
||||
def libraryDirectory = project.group.replace('.', '/') + "/${project.archivesBaseName}/${variantName}"
|
||||
nativeJar.into(libraryDirectory) { from builderTask.outputFile }
|
||||
nativeJar.dependsOn builderTask
|
||||
def importLibPath = binary.sharedLibraryLinkFile.absolutePath.replace('.dll', '.lib')
|
||||
linker.args "-Wl,--out-implib,${importLibPath}"
|
||||
}
|
||||
|
||||
def mainPom = uploadArchives.repositories.mavenDeployer.pom
|
||||
mainPom.groupId = project.group
|
||||
mainPom.artifactId = jar.baseName
|
||||
mainPom.version = project.version
|
||||
mainPom.scopeMappings.mappings.clear()
|
||||
mainPom.withXml { provider ->
|
||||
def node = provider.asNode()
|
||||
def deps = node.appendNode('dependencies')
|
||||
['windows-amd64', 'windows-i386'].each { platform ->
|
||||
def dep = deps.appendNode('dependency')
|
||||
dep.appendNode('groupId', project.group)
|
||||
dep.appendNode('artifactId', "${project.archivesBaseName}-${platform}")
|
||||
dep.appendNode('version', project.version)
|
||||
}
|
||||
def dep = deps.appendNode('dependency')
|
||||
dep.appendNode('groupId', 'com.github.boukefalos')
|
||||
dep.appendNode('artifactId', 'jlibloader')
|
||||
dep.appendNode('version', '0.2')
|
||||
}
|
||||
Reference in New Issue
Block a user