Skip to content

Commit

Permalink
Add dependency on manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbuessow committed Nov 7, 2023
1 parent 1b08569 commit 4eba701
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
2 changes: 2 additions & 0 deletions GlucoseDataField/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ filegroup(
monkeyc_binary(
name = 'GlucoseDataField',
jungles = 'monkey.jungle',
manifest = 'manifest.xml',
resources = ['//Shared:Resources', ':resources'],
srcs = ['//Shared', ':sources'],
)

monkeyc_package(
name = 'package',
jungles = 'monkey.jungle',
manifest = 'manifest.xml',
resources = [':resources'],
srcs = [':sources'],
)
3 changes: 3 additions & 0 deletions GlucoseWatchFace/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ filegroup(
monkeyc_binary(
name = 'GlucoseWatchFace',
jungles = 'monkey.jungle',
manifest = 'manifest.xml',
resources = [':resources'],
srcs = [':sources'],
)

monkeyc_binary(
name = 'test',
jungles = 'monkey.jungle',
manifest = 'manifest.xml',
resources = [':resources'],
srcs = [':sources'],
test = True,
Expand All @@ -35,6 +37,7 @@ monkeyc_binary(
monkeyc_package(
name = 'package',
jungles = 'monkey.jungle',
manifest = 'manifest.xml',
resources = [':resources'],
srcs = [':sources'],
)
Expand Down
1 change: 1 addition & 0 deletions GlucoseWidget/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ filegroup(
monkeyc_binary(
name = 'GlucoseWidget',
jungles = 'monkey.jungle',
manifest = 'manifest.xml',
srcs = ['//Shared', ':sources'],
resources = glob(['resources*/**/*.xml'], exclude_directories=1, allow_empty=True),
)
16 changes: 0 additions & 16 deletions NearPeaksWidget/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,3 @@ filegroup(
'source/OverpassLookup.mc',
],
)

#monkeyc_binary(
# name = 'fenix5plus',
# manifest = 'manifest.xml',
# device = 'fenix5plus',
# resources = [':resources'],
# srcs = [':sources'],
#)
#
#monkeyc_binary(
# name = 'fenix7',
# manifest = 'manifest.xml',
# device = 'fenix7',
# resources = [':resources'],
# srcs = [':sources'],
#)
1 change: 1 addition & 0 deletions Test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ filegroup(
monkeyc_binary(
name = 'Test',
jungles = 'monkey.jungle',
manifest = 'manifest.xml',
resources = ['//Shared:Resources', ':resources'],
test = True,
srcs = ['//Shared',
Expand Down
6 changes: 4 additions & 2 deletions monkey.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _monkeyc_binary_impl(ctx):
]
profile = ctx.var['COMPILATION_MODE'] == 'dbg'
ctx.actions.run_shell(
inputs = ctx.files.jungles + ctx.files.srcs + ctx.files.resources,
inputs = ctx.files.jungles + ctx.files.srcs + ctx.files.resources + ctx.files.manifest,
outputs = outputs,
progress_message = 'Building %s.prg' % ctx.attr.name,
execution_requirements = { 'no-sandbox': 'True' },
Expand Down Expand Up @@ -68,7 +68,7 @@ def _monkeyc_package_impl(ctx):
prg_file = ctx.actions.declare_file(prg + ".iq")
outputs = [prg_file]
ctx.actions.run_shell(
inputs = ctx.files.jungles + ctx.files.srcs + ctx.files.resources,
inputs = ctx.files.jungles + ctx.files.srcs + ctx.files.resources + ctx.files.manifest,
outputs = outputs,
progress_message = 'Building %s.iq' % ctx.attr.name,
execution_requirements = { 'no-sandbox': 'True' },
Expand All @@ -92,6 +92,7 @@ monkeyc_binary = rule(
'srcs': attr.label_list(mandatory=True, allow_files=['.mc']),
'resources': attr.label_list(default=[], allow_files=True),
'jungles': attr.label(mandatory=True, allow_single_file=True),
'manifest': attr.label(mandatory=True, allow_single_file=True),
'test': attr.bool(default=False),
},
executable = True,
Expand All @@ -103,6 +104,7 @@ monkeyc_package = rule(
'srcs': attr.label_list(mandatory=True, allow_files=['.mc']),
'resources': attr.label_list(default=[], allow_files=True),
'jungles': attr.label(mandatory=True, allow_single_file=True),
'manifest': attr.label(mandatory=True, allow_single_file=True),
},
executable = False,
)
Expand Down

0 comments on commit 4eba701

Please sign in to comment.