Commit Graph

248 Commits

Author SHA1 Message Date
Stephane Nicoll
c298a6d021 Polish 2019-05-21 13:45:58 +02:00
Stephane Nicoll
75228ba4a3 Add parentheses for method invocations with no argument
Closes gh-907
2019-05-21 11:39:04 +02:00
Stephane Nicoll
372e823d21 Fix version references in Gradle KTS build
Closes gh-901
2019-05-17 18:45:40 +02:00
Stephane Nicoll
c7c16872c4 Polish "Add Gradle Kotlin DSL support"
In particular, this commit replaces the GradleKts dedicated build system
in favor of a dedicated build system dialect.

Closes gh-851

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
2019-05-15 16:54:50 +02:00
jnizet
239116b29a Add Gradle Kotlin DSL support
This commit refactors the existing Groovy DSL writers in order to share
code between the Groovy DSL and Kotlin DSL writers.

See gh-851
2019-05-15 16:54:50 +02:00
jnizet
020d66be63 Add GradleKts build system
This commit adds a BuildSystem implementation for the Gradle Kotlin DSL

See gh-851
2019-05-15 16:54:50 +02:00
Madhura Bhave
0f645c7143 Polish "Add support for Gradle's tasksWithType"
Closes gh-890

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-05-02 10:42:21 +02:00
jnizet
0eeb85697e Add support for Gradle's tasksWithType
This commit adds support for configuring several tasks at once using
a type. It also migrates the Kotlin support so that, instead of
configuring compileKotlin and compileTestKotlin, it configures all
tasks of type KotlinCompile at once.

See gh-890
2019-05-02 09:41:05 +02:00
Andy Wilkinson
3409325342 Allow ext properties to have non-String values
Closes gh-893
2019-04-30 13:09:14 +01:00
Stephane Nicoll
f97867650d Extend conditions that can apply to more than one value
This commit extends the build system and platform conditions to allow
for several values to be specified. Those conditions match if any of
the provided value matches.

Closes gh-888
2019-04-11 07:37:10 +02:00
Andy Wilkinson
b387a77e73 Disable HTML escaping when rendering Mustache templates
Closes gh-885
2019-04-05 10:40:50 +01:00
Stephane Nicoll
357313c7bf Upgrade to spring-javaformat 0.0.7
This commit upgrades to spring-javaformat 0.0.7 and checkstyle 8.18.
2019-03-20 17:34:50 +01:00
Stephane Nicoll
166fbf7e97 Fix typo 2019-03-17 14:42:46 +01:00
Stephane Nicoll
738cf0f55b Move BuildWriter to core module
See gh-871
2019-03-17 11:08:09 +01:00
Stephane Nicoll
1ad3dae770 Polish 2019-03-15 14:24:25 +01:00
Stephane Nicoll
9465a70fa6 Polish 2019-03-15 11:50:10 +01:00
Stephane Nicoll
0ecdf3097a Restore the ability to generate several parameters with the same name
This commit fixes the handling of configuration parameters so that
nested groups can be reused when requested with the same parameter
name. However, single parameters are additive.

Closes gh-867
2019-03-14 17:51:04 +01:00
Stephane Nicoll
0805345e85 Make sure that Maven plugins can be amended
Closes gh-867
2019-03-14 15:27:02 +01:00
Stephane Nicoll
ae87d7381c Make sure that Maven plugin executions can be amended
See gh-867
2019-03-14 15:26:45 +01:00
Stephane Nicoll
a5e2994f1d Make sure that Maven plugin configuration can be amended
See gh-867
2019-03-14 15:23:17 +01:00
Stephane Nicoll
ec6ac4b1d8 Harmonize assertions on text file content
This commit harmonizes assertions on text file content by sharing the
code that reads and validate candidates. Make sure that streams are
properly closed which may fix build failures on Windows.

See gh-862
2019-03-13 14:42:23 +01:00
Stephane Nicoll
9f4c6a5326 Fix assertions to work on Windows
Closes gh-859
2019-03-11 18:06:17 +01:00
jnizet
6b0b5377ec Add missing spaces in generated Gradle code
Closes gh-852
2019-03-04 11:11:00 +01:00
Stephane Nicoll
e7ee22f73a Restore support for Gradle 3
While new scopes are available as of Gradle 3.4, the Spring Boot plugin
does not manage them in the `1.5.x` line. This commit introduces a
dedicated GradleBuildWriter for Gradle 3 that uses the previous scopes.

Closes gh-845
2019-02-21 18:22:52 +01:00
Stephane Nicoll
924a73310a Project documentation infrastructure
This commit adds support for an `HelpDocument` that can be generated
alongside the project. Such document can hold an arbitrary number of
sections with pre-defined sections such as "Getting Started" and "Next
Steps".

A default contributor retrieves the links for requested dependencies
and add them to the document.

Closes gh-353

Co-authored-by: Madhura Bhave <mbhave@pivotal.io>
2019-02-19 21:10:58 -08:00
Andy Wilkinson
a049d6e4fc Polish 2019-02-19 10:03:40 +00:00
Madhura Bhave
11ffe794fa Generated code should have only one newline at the end
Fixes gh-828
2019-02-15 15:13:20 -08:00
Stephane Nicoll
701f3f6277 Map project version from version capability
Closes gh-832
2019-02-14 14:52:07 +01:00
Stephane Nicoll
c98f59e8f2 Remove deprecated stsId
Closes gh-820
2019-02-11 12:46:00 +01:00
Stephane Nicoll
9dc3cc65d1 Polish module dependencies 2019-02-08 13:01:32 +01:00
Stephane Nicoll
cd3b274112 Rationalize exception management 2019-02-08 11:00:04 +01:00
Stephane Nicoll
478c0c41c6 Relocate Agent to web module 2019-02-08 10:56:41 +01:00
Stephane Nicoll
b6657211f6 Review TemplateRenderer abstraction
Closes gh-818
2019-02-08 10:53:49 +01:00
Stephane Nicoll
6e9f542560 Polish 2019-02-08 10:24:59 +01:00
Stephane Nicoll
5e04746746 Add Spring-based project contributors
This commit adds an optional module that gathers the opinions that are
used to generate a Spring Boot project.

Closes gh-340

Co-authored-by: Madhura Bhave <mbhave@pivotal.io>
Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
2019-02-08 09:50:35 +01:00
Stephane Nicoll
0d5efd24ba Add support for customizable project generation
This commit adds a project generation infrastructure based on the
abstraction defined thus far. Each project is described by a
`ProjectDescription` that provides the basic information about the
project such as language, build system, packaging, platform version
and more.

Each project runs in a dedicated `ProjectApplicationContext` where
contributors and customizers are elected to generate the project.

Customizers are meant to update the model based on the
`ProjectDescription` and other factors while contributors consume
models to generate project assets (build files, source files, etc).

Because project generation runs in a dedicated context, components can
be flagged with special conditions that enable them only when necessary.
Several conditions are provided in this commit to enable a component
based on the language, build system, packaging, platform version or
requested dependency.

See gh-340

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
Co-authored-by: Madhura Bhave <mbhave@pivotal.io>
2019-02-08 09:50:34 +01:00
Andy Wilkinson
2cb1f3e647 Add packaging abstraction
Closes gh-815

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-02-08 09:50:34 +01:00
Andy Wilkinson
3f585337da Add Maven build support
This commit provides a Maven build system implementation with a writer
that can generate `pom.xml` files based on a configurable model.

Closes gh-814

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-02-08 09:50:34 +01:00
Andy Wilkinson
2bd64ed6ed Add Gradle build support
This commit provides a Gradle build system implementation with a writer
that can generate `build.gradle` and `settings.gradle` files based on a
configurable model.

See gh-814
2019-02-08 09:50:34 +01:00
Andy Wilkinson
1dbed8cdf8 Add build abstraction
This commit adds a build abstraction with a base model that concrete
build systems can reuse.

See gh-814

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-02-08 09:50:34 +01:00
Stephane Nicoll
b5ba883b02 Add Groovy language support
This commit provides a Groovy language implementation with a writer that
can generate a `.groovy` source file based on a configurable model.

Closes gh-813
2019-02-08 09:50:34 +01:00
Stephane Nicoll
bdfa852675 Add Kotlin language support
This commit provides a Kotlin language implementation with a writer that
can generate a `.kt` source file based on a configurable model.

See gh-813
2019-02-08 09:50:34 +01:00
Andy Wilkinson
d0d4809ee9 Add Java language support
This commit provides a Java language implementation with a writer that
can generate a `.java` source file based on a configurable model.

See gh-813

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-02-08 09:50:34 +01:00
Andy Wilkinson
77bb7eb3ac Add language abstraction
This commit adds a `Language` on the JVM abstraction with well known
concepts such as `Annotation`, `Parameter`, `CompilationUnit` and
`TypeDeclaration` that concrete language implementations can reuse.

See gh-813

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-02-08 09:50:34 +01:00
Stephane Nicoll
b6e675de40 Add writer with indent support
This commit adds an `IndentingWriter` with a factory that supports
different indenting option according to a content identifier (e.g. a
language).

Closes gh-812

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
2019-02-08 09:50:34 +01:00
Stephane Nicoll
3fa03b8438 Move metadata to a dedicated module
This commit moves the `metadata` package to a dedicated
`initializr-metadata` module so that it can be shared.

Closes gh-804
2019-02-08 09:50:34 +01:00
Stephane Nicoll
6ccfb69692 Promote version infrastructure to dedicated package
This commit moves `Version` and related support classes to a dedicated
package

Closes gh-811
2019-02-08 09:50:34 +01:00
Madhura Bhave
e281480426 Switch project structure to use the new generator
This commit removes the former `ProjectGenerator` api based on mustache
template in favour of a new DSL infrastructure to be detailed in further
commits.

Event handling is now web-specific with a `ProjectRequest` and a
`WebProjectRequest` that gathers the base input from the request and
some additional web-specific metadata, respectively. As a consequence
the `initializr-actuator` module has now a dependency on the
`initializr-web` module.

See gh-340

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-02-08 09:50:26 +01:00
Stephane Nicoll
0628829cd3 Upgrade to JUnit Jupiter 5.4.0-RC2 2019-02-07 10:53:31 +01:00
Madhura Bhave
1bd84fe0ce Use metadata used for project generation for stats
Closes gh-810
2019-02-06 11:39:05 -08:00