47 lines
1.1 KiB
Groovy
47 lines
1.1 KiB
Groovy
apply plugin: 'org.jetbrains.kotlin.platform.native'
|
|
apply plugin: 'maven-publish'
|
|
|
|
group 'org.jetbrains.kotlin.native'
|
|
version '1.0'
|
|
|
|
// Native component
|
|
components.main {
|
|
targets = ['macos_x64', 'linux_x64']
|
|
|
|
dependencies {
|
|
cinterop('libcurl-interop') {
|
|
defFile 'src/main/c_interop/libcurl.def'
|
|
|
|
target('linux_x64') {
|
|
includeDirs.headerFilterOnly '/usr/include', '/usr/include/x86_64-linux-gnu'
|
|
}
|
|
target('macos_x64') {
|
|
includeDirs.headerFilterOnly '/opt/local/include', '/usr/local/include'
|
|
}
|
|
}
|
|
}
|
|
|
|
pom {
|
|
withXml {
|
|
def root = asNode()
|
|
root.appendNode('name', 'libcurl interop library')
|
|
root.appendNode('description', 'A library providing interoperability with host libcurl')
|
|
}
|
|
}
|
|
}
|
|
|
|
// Publishing
|
|
def localMavenRepo="file://${new File(System.properties['user.home'] as String)}/.m2-kotlin-native"
|
|
|
|
task cleanLocalRepo(type: Delete) {
|
|
delete localMavenRepo
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
url = localMavenRepo
|
|
}
|
|
}
|
|
}
|