There are several places where a new RawInput is created. Factor these out to static methods in a new RawInputUtil class in gerrit-common. Inspired-by: David Ostrovsky <david@ostrovsky.org> Change-Id: I10b099e269427b0f887bfb41bbb3f10f46cf2620
		
			
				
	
	
		
			79 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
SRC = 'src/main/java/com/google/gerrit/'
 | 
						|
 | 
						|
ANNOTATIONS = [
 | 
						|
  SRC + 'common/Nullable.java',
 | 
						|
  SRC + 'common/audit/Audit.java',
 | 
						|
  SRC + 'common/auth/SignInRequired.java',
 | 
						|
]
 | 
						|
 | 
						|
EXCLUDES = [
 | 
						|
  SRC + 'common/SiteLibraryLoaderUtil.java',
 | 
						|
  SRC + 'common/PluginData.java',
 | 
						|
  SRC + 'common/FileUtil.java',
 | 
						|
  SRC + 'common/IoUtil.java',
 | 
						|
  SRC + 'common/RawInputUtil.java',
 | 
						|
  SRC + 'common/TimeUtil.java',
 | 
						|
  SRC + 'common/data/SubscribeSection.java',
 | 
						|
]
 | 
						|
 | 
						|
java_library(
 | 
						|
  name = 'annotations',
 | 
						|
  srcs = ANNOTATIONS,
 | 
						|
  visibility = ['PUBLIC'],
 | 
						|
)
 | 
						|
 | 
						|
gwt_module(
 | 
						|
  name = 'client',
 | 
						|
  srcs = glob([SRC + 'common/**/*.java'], excludes = EXCLUDES),
 | 
						|
  gwt_xml = SRC + 'Common.gwt.xml',
 | 
						|
  exported_deps = [
 | 
						|
    '//gerrit-extension-api:client',
 | 
						|
    '//gerrit-prettify:client',
 | 
						|
    '//lib:gwtorm_client',
 | 
						|
  ],
 | 
						|
  visibility = ['PUBLIC'],
 | 
						|
)
 | 
						|
 | 
						|
java_library(
 | 
						|
  name = 'server',
 | 
						|
  srcs = glob([SRC + 'common/**/*.java'], excludes = ANNOTATIONS),
 | 
						|
  deps = [
 | 
						|
    ':annotations',
 | 
						|
    '//gerrit-extension-api:api',
 | 
						|
    '//gerrit-patch-jgit:server',
 | 
						|
    '//gerrit-prettify:server',
 | 
						|
    '//gerrit-reviewdb:server',
 | 
						|
    '//lib:gwtjsonrpc',
 | 
						|
    '//lib:gwtorm',
 | 
						|
    '//lib:guava',
 | 
						|
    '//lib/joda:joda-time',
 | 
						|
    '//lib/log:api',
 | 
						|
    '@jgit//org.eclipse.jgit:jgit',
 | 
						|
  ],
 | 
						|
  provided_deps = ['//lib:servlet-api-3_1'],
 | 
						|
  visibility = ['PUBLIC'],
 | 
						|
)
 | 
						|
 | 
						|
TEST = 'src/test/java/com/google/gerrit/common/'
 | 
						|
AUTO_VALUE_TEST_SRCS = [TEST + 'AutoValueTest.java']
 | 
						|
 | 
						|
java_test(
 | 
						|
  name = 'client_tests',
 | 
						|
  srcs = glob(['src/test/java/**/*.java'], excludes = AUTO_VALUE_TEST_SRCS),
 | 
						|
  deps = [
 | 
						|
    ':client',
 | 
						|
    '//lib:guava',
 | 
						|
    '//lib:junit',
 | 
						|
  ],
 | 
						|
  source_under_test = [':client'],
 | 
						|
)
 | 
						|
 | 
						|
java_test(
 | 
						|
  name = 'auto_value_tests',
 | 
						|
  srcs = AUTO_VALUE_TEST_SRCS,
 | 
						|
  deps = [
 | 
						|
    '//lib:truth',
 | 
						|
    '//lib/auto:auto-value',
 | 
						|
  ],
 | 
						|
)
 |