Skip to content
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

build(gradle): Kotlin DSL build and Dependabot #243

Merged
merged 26 commits into from
Apr 29, 2021

Conversation

stachu540
Copy link
Contributor

@stachu540 stachu540 commented Dec 21, 2020

Prerequisites for Code Changes

  • This pull request follows the code style of the project
  • I have tested this feature

Changes Proposed

  1. Revmap build to kotlin-dsl
  2. creating .github/dependabot.yml for dependencies

Additional Information

Revmaped build to Kotlin DSL will help simplify build library. Creating buildSrc and provide function and his extensions gives oportunity to doing some cleanup. Of course created gradle.properties provides only group and version. If you wish extracting version from environmental variables i can move it to buildSrc/src/main/kotlin/_globals.kt which are having more environmental variables definition into property when they are accessible for all projects. All changes are tested without no issue (for now). WARNING: Do not add apply false into plugins definition. It cause exceptions of missing properties or functions, which are be not loaded if you didn't apply plugin inside the file. More about cross configuration project will find here

Dependabot is supported for Kotlin DSL. Preview version doesn't have it this feature.

After resolving #244 i will start resolve this PR. For now marking him as Draft.

with extended functions in `buildSrc` and `gradle.properties` (group and version)
for kotlin dsl builds. Dependabot preview will not work for the kotlin dsl builds.
@stachu540
Copy link
Contributor Author

I'll hold kotlin dsl changes. The bug is more complex that we can imagine it. Extended functions defined for dependencies will be break it, if you try fetching jar resources classes (I think). To avoid that we will use a quoted configuration like that: "implementation"(project(":common")). This feature provided from shadow plugin breaks a configurations defined in kotlin-dsl's extended functions.

Simple: Using kotlin-dsl with shadow pluigin and define this lines ,and will disallow loading extended functions, resolving errors of unknown extended function. This should be fixed only quoting configuration name as mentioned above.

- added missing eventsub-common
- refactor and added missing dependencies
- adding missing dsl's
- bumping gradle to 6.8
- update to base branch `develop`
resolve conflict with configurations. For later
Mentioned in discord private chat, and i guess i can ready to merge that
@stachu540 stachu540 marked this pull request as ready for review January 20, 2021 01:19
@stachu540
Copy link
Contributor Author

This is ready to review and deploy. Only some typings (spaces, new-lines, etc.).

gradle.properties Outdated Show resolved Hide resolved
@stachu540 stachu540 marked this pull request as draft March 28, 2021 21:59
build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
@stachu540 stachu540 marked this pull request as ready for review April 19, 2021 06:37
@stachu540
Copy link
Contributor Author

stachu540 commented Apr 19, 2021

I put some suggestion comments here. Everything is ready to review.

I see some changes adding to central repository soo i can close #270 if there is no issue?

backtick quoting is not needed for that
PhilippHeuer and others added 4 commits April 20, 2021 01:03
Co-authored-by: Damian Staszewski <359222+stachu540@users.noreply.github.com>
update badges:
- adds javadoc
- add link to central
- "WIKI" names renamed to "documentation" and colored to "grey"
- all badges style are flat (not square)
`project.kt` - CI Management to GitLab Pipelines - for now
`globals.kt` - artifactId variable listing adjustment for better readable code lookup
@stachu540
Copy link
Contributor Author

stachu540 commented Apr 20, 2021

I have add manifest plugin to this branch.

Will be added in all jars because this plugin adds only add for jar task

build.gradle.kts Outdated Show resolved Hide resolved
Co-authored-by: Sidd <iProdigy@users.noreply.github.com>
Copy link
Member

@iProdigy iProdigy left a comment

Choose a reason for hiding this comment

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

Thanks for your hard work on this!

@iProdigy iProdigy merged commit 4289ec5 into twitch4j:develop Apr 29, 2021
Copy link
Contributor Author

@stachu540 stachu540 left a comment

Choose a reason for hiding this comment

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

artifactId will be setted in here

@PhilippHeuer
Copy link
Member

PhilippHeuer commented Apr 29, 2021

artifactId will be setted in here

Yes, but the generated artifactId's from the module names don't match the existing artifact names we published in the past, so i used fixed values everywhere to make sure it's pushed correctly.
For example the artifactId for helix should be twitch4j-helix, while the module name rest-helix would end up as twitch4j-rest-helix - thats why i set the artifactId in each module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants