| 
									
										
										
										
											2017-08-21 20:41:46 +08:00
										 |  |  | description = "Spring Beans" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | apply plugin: "groovy" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | dependencies { | 
					
						
							| 
									
										
										
										
											2018-08-16 21:32:44 +08:00
										 |  |  | 	compile(project(":spring-core")) | 
					
						
							| 
									
										
										
										
											2017-08-21 20:41:46 +08:00
										 |  |  | 	optional("javax.inject:javax.inject:1") | 
					
						
							| 
									
										
										
										
											2019-03-06 23:40:06 +08:00
										 |  |  | 	optional("org.yaml:snakeyaml:1.24") | 
					
						
							| 
									
										
										
										
											2018-06-08 19:37:44 +08:00
										 |  |  | 	optional("org.codehaus.groovy:groovy-xml:${groovyVersion}") | 
					
						
							| 
									
										
										
										
											2019-07-19 16:20:35 +08:00
										 |  |  | 	optional("org.jetbrains.kotlin:kotlin-reflect") | 
					
						
							|  |  |  | 	optional("org.jetbrains.kotlin:kotlin-stdlib") | 
					
						
							| 
									
										
										
										
											2017-08-21 20:41:46 +08:00
										 |  |  | 	testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}") | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-16 18:08:26 +08:00
										 |  |  | // This module does joint compilation for Java and Groovy code with the compileGroovy task.
 | 
					
						
							| 
									
										
										
										
											2017-08-21 20:41:46 +08:00
										 |  |  | sourceSets { | 
					
						
							|  |  |  | 	main.groovy.srcDirs += "src/main/java" | 
					
						
							|  |  |  | 	main.java.srcDirs = [] | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | compileGroovy { | 
					
						
							|  |  |  | 	sourceCompatibility = 1.8 | 
					
						
							|  |  |  | 	targetCompatibility = 1.8 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-16 18:08:26 +08:00
										 |  |  | // This module also builds Kotlin code and the compileKotlin task naturally depends on
 | 
					
						
							|  |  |  | // compileJava. We need to redefine dependencies to break task cycles.
 | 
					
						
							| 
									
										
										
										
											2018-03-30 10:41:01 +08:00
										 |  |  | def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues | 
					
						
							| 
									
										
										
										
											2018-08-16 21:32:44 +08:00
										 |  |  | compileGroovy.dependsOn = deps - "compileJava" | 
					
						
							| 
									
										
										
										
											2017-08-21 20:41:46 +08:00
										 |  |  | compileKotlin.dependsOn(compileGroovy) | 
					
						
							|  |  |  | compileKotlin.classpath += files(compileGroovy.destinationDir) |