-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify generated build #424
Conversation
…ile optional features when buildSrc feature is selected buildscript{} will not generate in main build.gradle file
This required significant changes to get the desired outcome. We need to debate whether this is completed in 6.2.2 or 7.0.0. grails/gorm-docs#24 - ticket to update documentation. |
grails-forge-core/src/main/java/org/grails/forge/feature/assetPipeline/AssetPipeline.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was some heavy lifting, nice work James!
I think there is a risk that doing this big of a change will introduce bugs in 6.2.2
. As you say, we should discuss if it is worth the trouble to merge this to 6.2.x
.
I'm not sure it's even going to help anyone out, but rather cause more confusion. If a user is on Grails 5 or lower, is there any need to upgrade to Grails 6 before upgrading to Grails 7? If a user is on Grails 6 it should be an easy operation to remove buildSrc when upgrading to Grails 7 (if that is what the user wants).
...rge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/dependency.rocker.raw
Outdated
Show resolved
Hide resolved
grails-forge-core/src/test/groovy/org/grails/forge/feature/lang/GrailsApplicationSpec.groovy
Outdated
Show resolved
Hide resolved
@matrei we need to think from the perspective of what is
|
…o features instead of manually being set in dependencies.rocker.raw remove dependencies.rocker.raw since it duplicates toSnippet() rename RUNTIME to RUNTIME_ONLY, TEST to TEST_IMPLEMENTATION and TEST_RUNTIME to TEST_RUNTIME_ONLY to reflect the actual Gradle scope
public static final Scope TEST_ANNOTATION_PROCESSOR = new Scope(Source.TEST, Collections.singletonList(Phase.ANNOTATION_PROCESSING)); | ||
public static final Scope TEST_COMPILE_ONLY = new Scope(Source.TEST, Collections.singletonList(Phase.COMPILATION)); | ||
public static final Scope TEST_RUNTIME = new Scope(Source.TEST, Collections.singletonList(Phase.RUNTIME)); | ||
public static final Scope TEST_RUNTIME_ONLY = new Scope(Source.TEST, Collections.singletonList(Phase.RUNTIME)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add the integrationTest*
scopes for completeness. Geb, Selenium and perhaps some others should preferably be moved to those.
And what about renaming compile
to implementation
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I've renamed compile
to implementation
.
For integrationTest*
scopes, I'd like to do that on the 7.0.x
branch since it already has INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES
grails-forge/grails-forge-core/src/main/java/org/grails/forge/build/dependencies/Scope.java
Line 40 in a875736
public static final Scope INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES = new Scope(Source.MAIN, Collections.singletonList(Phase.INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES)); |
I've seen this test fail several times. Deleting build manually gets it working again.
|
…e same as main build.gradle file this is the only Gradle build dependency that is needed in buildSrc/build.gradle and not in buildscript{}
This was significantly more involved than anticipated.
This PR:
buildscript{}
,plugins{}
andapply plugin:
inbuild.gradle
buildscript{}
is not generated, they are equivalentid
andversion
.TEST_RUNTIME to TEST_RUNTIME_ONLY to reflect the actual Gradle scopes
Merging up to 7.0.x is going to be fun.