File tree Expand file tree Collapse file tree 5 files changed +30
-10
lines changed
server/support/__snapshots__
spring-boot/generators/liquibase
templates/src/main/java/_package_/config Expand file tree Collapse file tree 5 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 1717 * limitations under the License.
1818 */
1919import { asWriteFilesSection } from '../base-application/support/task-type-inference.ts' ;
20- import { SERVER_MAIN_RES_DIR , SERVER_MAIN_SRC_DIR } from '../generator-constants.ts' ;
21- import { moveToJavaPackageSrcDir } from '../java/support/index.ts' ;
20+ import { SERVER_MAIN_RES_DIR } from '../generator-constants.ts' ;
2221
2322export const liquibaseFiles = asWriteFilesSection ( {
24- liquibase : [
25- {
26- condition : ctx => ctx . backendTypeSpringBoot ,
27- path : `${ SERVER_MAIN_SRC_DIR } _package_/` ,
28- renameTo : moveToJavaPackageSrcDir ,
29- templates : [ 'config/LiquibaseConfiguration.java' ] ,
30- } ,
31- ] ,
3223 gradle : [
3324 {
3425 condition : ctx => ctx . buildToolGradle ,
Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ exports[`generator - server - support - needles generated project should match s
119119 " src/main/java/com/mycompany/myapp/config/JacksonHibernateConfiguration.java" : {
120120 " stateCleared" : " modified" ,
121121 },
122+ " src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java" : {
123+ " stateCleared" : " modified" ,
124+ },
122125 " src/main/java/com/mycompany/myapp/config/LoggingAspectConfiguration.java" : {
123126 " stateCleared" : " modified" ,
124127 },
Original file line number Diff line number Diff line change @@ -30,5 +30,8 @@ exports[`generator - spring-boot:liquibase with defaults options should match fi
3030 " .yo-rc.json" : {
3131 " stateCleared" : " modified" ,
3232 },
33+ " src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java" : {
34+ " stateCleared" : " modified" ,
35+ },
3336}
3437` ;
Original file line number Diff line number Diff line change 1616 * See the License for the specific language governing permissions and
1717 * limitations under the License.
1818 */
19+ import { SERVER_MAIN_SRC_DIR } from '../../../generator-constants.ts' ;
20+ import { moveToJavaPackageSrcDir } from '../../../java/support/files.ts' ;
1921import { SpringBootApplicationGenerator } from '../../generator.ts' ;
2022
2123export default class SpringBootLiquibaseGenerator extends SpringBootApplicationGenerator {
@@ -30,6 +32,27 @@ export default class SpringBootLiquibaseGenerator extends SpringBootApplicationG
3032 }
3133 }
3234
35+ get writing ( ) {
36+ return this . asWritingTaskGroup ( {
37+ async writeFiles ( { application } ) {
38+ await this . writeFiles ( {
39+ blocks : [
40+ {
41+ path : `${ SERVER_MAIN_SRC_DIR } _package_/` ,
42+ renameTo : moveToJavaPackageSrcDir ,
43+ templates : [ 'config/LiquibaseConfiguration.java' ] ,
44+ } ,
45+ ] ,
46+ context : application ,
47+ } ) ;
48+ } ,
49+ } ) ;
50+ }
51+
52+ get [ SpringBootApplicationGenerator . WRITING ] ( ) {
53+ return this . delegateTasksToBlueprint ( ( ) => this . writing ) ;
54+ }
55+
3356 get postWriting ( ) {
3457 return this . asPostWritingTaskGroup ( {
3558 customizeApplicationProperties ( { source, application } ) {
File renamed without changes.
You can’t perform that action at this time.
0 commit comments