HHH-9161 - Improve build handling of generated sources
This commit is contained in:
parent
5bb9d2e2d1
commit
f237a9d24f
|
@ -148,8 +148,6 @@ subprojects { subProject ->
|
|||
testRuntime( libraries.javassist )
|
||||
testRuntime( libraries.h2 )
|
||||
|
||||
jbossLoggingTool( libraries.logging_processor )
|
||||
|
||||
jaxb( libraries.jaxb ){
|
||||
exclude group: "javax.xml.stream"
|
||||
}
|
||||
|
@ -185,15 +183,12 @@ subprojects { subProject ->
|
|||
tasks.withType( JavaCompile.class ).all { task->
|
||||
task.options.compilerArgs += [
|
||||
"-nowarn",
|
||||
"-proc:none",
|
||||
"-encoding", "UTF-8",
|
||||
"-source", rootProject.javaLanguageLevel,
|
||||
"-target", rootProject.javaLanguageLevel
|
||||
]
|
||||
}
|
||||
|
||||
addLoggingProcessor( sourceSets.main )
|
||||
|
||||
jar {
|
||||
manifest = osgiManifest {
|
||||
// GRADLE-1411: Even if we override Imports and Exports
|
||||
|
|
|
@ -74,9 +74,6 @@ class SourceGenerationPlugin implements Plugin<Project> {
|
|||
}
|
||||
|
||||
class SourceGenerationPluginConvention {
|
||||
public static final String LOGGING_DEPENDENCY_CONFIG_NAME = "jbossLoggingTool";
|
||||
public static final String LOGGING_PROCESSOR_NAME = "org.jboss.logging.processor.apt.LoggingToolsProcessor";
|
||||
|
||||
public static final String METAGEN_DEPENDENCY_CONFIG_NAME = "hibernateJpaModelGenTool";
|
||||
public static final String METAGEN_PROCESSOR_NAME = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor";
|
||||
|
||||
|
@ -90,12 +87,6 @@ class SourceGenerationPluginConvention {
|
|||
this.project = project
|
||||
}
|
||||
|
||||
public void addLoggingProcessor(SourceSet sourceSet) {
|
||||
AnnotationProcessorOnlyTask task = getLocateProcessorOnlyTask( sourceSet )
|
||||
task.processors += LOGGING_PROCESSOR_NAME
|
||||
task.classpath += project.configurations[LOGGING_DEPENDENCY_CONFIG_NAME];
|
||||
}
|
||||
|
||||
private AnnotationProcessorOnlyTask getLocateProcessorOnlyTask(SourceSet sourceSet) {
|
||||
if ( sourceSet.name.equals( "main" ) ) {
|
||||
if ( mainProcOnlyTask == null ) {
|
||||
|
|
Loading…
Reference in New Issue