Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migrate to Gradle DSL as a build tool#73

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Pazus merged 16 commits intodevelopfromgradle-dsl-migration
Feb 22, 2019
Merged

Conversation

Pazus
Copy link
Member

@PazusPazus commentedFeb 17, 2019
edited
Loading

Migrate from Maven XML-based POM build configuration to static typed Gradle DSL (Uses Kotlin script facilities). The new version is much more readable and short. It’s quite easy to implement new features even the most custom one as we can use Kotlin to code anything we like right in the build file. Gradle is a modern widely used build tool which means there is only a small chance we have to write something custom. Anything that is possible with Maven can be reproduced with Gradle with (likely) fewer lines of code.

The main thing to understand is that Gradle build consists of “tasks” similar to Maven goals. You ask Gradle to execute a goal an it executes all required goals to execute the requested one. We can create new goals and introduce new dependencies if needed. Such approach is used to download Coverage resources.

I’ve made a small change to how we work with resources. I download it directly to the build directory so that sources don’t change on build as it’s a bad practice.

I also temporary added deployment of the snapshot to packagecloud for this branch to test it. Should be eliminated before merge.

@Pazus
Copy link
MemberAuthor

I'll leave pom.xml until the PR is approved so you can compare. I'm going to remove it before merging.

@@ -0,0 +1,172 @@
#!/usr/bin/env sh
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is generated file

@@ -0,0 +1,84 @@
@if"%DEBUG%"==""@echooff
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is generated file

Copy link
Member

@viniciusamviniciusam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Great job, looks good! Have you noticed any difference in the build time?

@Pazus
Copy link
MemberAuthor

Great job, looks good! Have you noticed any difference in the build time?

Thank you for the concerntion! It's actually a bit slower on CI, but I'll try to speed it up. Btw gradle is definitely much faster on your own machine while you develop as it heavily uses incremental builds and caches so it builds only needed things. On my machine the clean build takes 4s, second build - 1s.

Copy link
Member

@pessepesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think I love this new approach! Never did it myself, but it's actually code, which you know I like waaaay more than XML configuration ;)

@PazusPazus merged commit1d4dc11 intodevelopFeb 22, 2019
@PazusPazus deleted the gradle-dsl-migration branchFebruary 22, 2019 05:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@viniciusamviniciusamviniciusam left review comments

@pessepessepesse approved these changes

@jgebaljgebalAwaiting requested review from jgebal

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Pazus@viniciusam@pesse

[8]ページ先頭

©2009-2025 Movatter.jp