JettyDaemon invokes buck build to ensure GWT JS is up-to-date before running the server. To be completely compatible with the command line build it uses the same PATH environment variable, ignoring the PATH that is inherited from Eclipse. Including the PATH as part of the genrule() command ensures buck will rewrite the properties file anytime the user modifies the PATH, rather than only when there are updates to GWT Java sources. Using a properties file frees us from worrying about double quoting in shell: once in the genrule, again in the script itself. Using a single properties file ensures any GWT UI can be computed or verified by JettyDaemon. This change simplifies bootstrap for a developer as they no longer need to build the UI before launching the server from within Eclipse. JettyDaemon now takes care of it. Change-Id: If096a60d9a3f9d6d1502cc947b966109b4458717
		
			
				
	
	
		
			76 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
include_defs('//tools/build.defs')
 | 
						|
 | 
						|
genrule(
 | 
						|
  name = 'eclipse',
 | 
						|
  cmd = '',
 | 
						|
  srcs = [],
 | 
						|
  deps = [
 | 
						|
    ':_classpath',
 | 
						|
    ':_project',
 | 
						|
    '//tools:buck.properties',
 | 
						|
  ],
 | 
						|
  out = '__fake.eclipse__',
 | 
						|
)
 | 
						|
 | 
						|
genrule(
 | 
						|
  name = 'eclipse_project',
 | 
						|
  cmd = '',
 | 
						|
  srcs = [],
 | 
						|
  deps = [
 | 
						|
    ':_classpath_nocompile',
 | 
						|
    ':_project',
 | 
						|
    '//tools:buck.properties',
 | 
						|
  ],
 | 
						|
  out = '__fake.eclipse__',
 | 
						|
)
 | 
						|
 | 
						|
java_library(
 | 
						|
  name = 'classpath',
 | 
						|
  deps = LIBS + PGMLIBS + [
 | 
						|
    '//gerrit-acceptance-tests:acceptance_tests',
 | 
						|
    '//gerrit-gwtdebug:gwtdebug',
 | 
						|
    '//gerrit-gwtui:ui_module',
 | 
						|
    '//gerrit-httpd:httpd_tests',
 | 
						|
    '//gerrit-main:main_lib',
 | 
						|
    '//gerrit-server:server__compile',
 | 
						|
    '//lib/prolog:compiler_lib',
 | 
						|
  ] + scan_plugins(),
 | 
						|
)
 | 
						|
 | 
						|
genrule(
 | 
						|
  name = '_project',
 | 
						|
  cmd = '${:gen_project} $OUT',
 | 
						|
  srcs = [],
 | 
						|
  deps = [':gen_project'],
 | 
						|
  out = 'project',
 | 
						|
)
 | 
						|
 | 
						|
genrule(
 | 
						|
  name = '_classpath',
 | 
						|
  cmd = '${:gen_classpath} $OUT $DEPS',
 | 
						|
  srcs = [],
 | 
						|
  deps = [
 | 
						|
    ':classpath',
 | 
						|
    ':gen_classpath',
 | 
						|
  ],
 | 
						|
  out = 'classpath',
 | 
						|
)
 | 
						|
 | 
						|
genrule(
 | 
						|
  name = '_classpath_nocompile',
 | 
						|
  cmd = '${:gen_classpath}',
 | 
						|
  srcs = [],
 | 
						|
  deps = [':gen_classpath'],
 | 
						|
  out = '__fake.eclipse__',
 | 
						|
)
 | 
						|
 | 
						|
python_binary(
 | 
						|
  name = 'gen_classpath',
 | 
						|
  main = 'gen_classpath.py',
 | 
						|
)
 | 
						|
 | 
						|
python_binary(
 | 
						|
  name = 'gen_project',
 | 
						|
  main = 'gen_project.py',
 | 
						|
)
 |