Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bucklet for yang based OSGI libraries
Change-Id: Ieeef6357250c4e74e9c78310a65c809b3edd102b
- Loading branch information
1 parent
5af2e4f
commit e88d69b
Showing
8 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,51 @@ | |||
include_defs('//onos.defs') | |||
|
|||
def _get_name(): | |||
base_path = get_base_path() | |||
return ONOS_ARTIFACT_BASE + base_path.replace('/', '-') #TODO Unix-separator | |||
|
|||
def yang_osgi_jar( | |||
name = None, | |||
srcs = None, | |||
group_id = ONOS_GROUP_ID, | |||
version = ONOS_VERSION, | |||
deps = [], | |||
visibility = ['PUBLIC'], | |||
license = 'NONE', | |||
**kwargs | |||
): | |||
|
|||
if name is None: | |||
name = _get_name() | |||
|
|||
yang_jar = name + '-yang' | |||
bnd_jar = name + '-bnd' | |||
|
|||
args = { 'group':group_id, 'artifact':name, 'version':version } | |||
|
|||
yang_library( | |||
deps = deps, | |||
name = yang_jar, | |||
srcs = srcs, | |||
visibility = [ ], | |||
) | |||
|
|||
cmd = 'java -jar $(location //lib:bndexe) wrap -o $OUT ' | |||
cmd += '-b %(group)s.%(artifact)s ' % args | |||
cmd += '-v ' + version.replace('-', '.') + ' ' | |||
cmd += '$(location :%s) ' % yang_jar | |||
cmd += ' >/dev/null 2>&1' | |||
|
|||
genrule( | |||
name = bnd_jar, | |||
bash = cmd, | |||
out = name + '.jar', | |||
visibility = [], | |||
) | |||
|
|||
prebuilt_jar( | |||
name = name, | |||
binary_jar = ':' + bnd_jar, | |||
maven_coords = '%(group)s:%(artifact)s:%(version)s'%args, | |||
visibility = visibility, | |||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters