group = 'net.java.dev.jna' version = '3.5.2' release = true target = '1.4' buildscript { repositories { mavenRepo(urls: [buildPluginRepositoryURL]) { snapshotTimeout = org.gradle.api.internal.artifacts.ivyservice.GradleIBiblioResolver.ALWAYS } } dependencies { classpath 'org.tmatesoft.build:build:0.9.7-SNAPSHOT' } } task wrapper(type: Wrapper) {} configure(rootProject) { apply plugin : 'java' apply plugin : 'osgi' apply plugin: 'build' targetCompatibility = target sourceCompatibility = target bundleName = 'net.java.dev.jna' bundleVersion = buildVersion.getFullOSGIVersion() bundleVendor = 'TMate Software on behalf of JNA Developers Team' dependencies { compile 'net.java.dev.jna:jna:3.2.7' } classes << { configurations.compile.files.each { File jar -> copy { from zipTree(jar) into sourceSets.main.classesDir exclude 'META-INF/**' } } } jar { baseName = bundleName manifest { instruction 'Bundle-Description', 'JNA Library' instruction 'Export-Package', 'com.sun.jna.*;version=' + bundleVersion instruction 'Import-Package', '!*' attributes 'Bundle-SymbolicName': bundleName, 'Bundle-Version': bundleVersion, 'Bundle-Vendor': bundleVendor, 'Bundle-RequiredExecutionEnvironment' : 'J2SE-' + target } metaInf { from rootProject.file('LICENSE.txt') } } conf2ScopeMappings.mappings.remove(configurations.compile) artifacts { maven jar } }