Skip to content

Instantly share code, notes, and snippets.

@chbaranowski
Created March 26, 2015 06:40
Show Gist options
  • Save chbaranowski/15d4dc67b07bb93ae3f0 to your computer and use it in GitHub Desktop.
Save chbaranowski/15d4dc67b07bb93ae3f0 to your computer and use it in GitHub Desktop.
Gradle bnd build example
buildscript {
repositories {
ivy {
url 'https://bndtools.ci.cloudbees.com/job/bnd.master/lastSuccessfulBuild/artifact/dist/bundles'
layout 'pattern', { artifact '[module]/[artifact]-[revision].[ext]' /* OSGi repo pattern */ }
}
}
dependencies { classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:3.0.0' }
}
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'biz.aQute.bnd.builder'
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.6'
compile 'org.osgi:org.osgi.core:5.0.0'
compile 'biz.aQute.bnd:biz.aQute.bnd.annotation:2.4.0'
}
jar {
manifest {
attributes('Bundle-Activator': 'gradle.osgi.bundle.Activator')
attributes('Service-Component': '*')
attributes('Export-Package': 'gradle.osgi.api.*')
attributes('Private-Package': 'gradle.osgi.bundle')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment