kbase / auth2

KBase authentication server MKII
MIT License
1 stars 9 forks source link

SECURITY-3: Switch from Ant -> Gradle #419

Closed MrCreosote closed 8 months ago

MrCreosote commented 8 months ago

This PR is a bit large but for me it was easier to understand the changes with the full ant -> gradle conversion. Instead, the PR is split up mostly by commit - the first commit gets the basics (compile & test) working, and then each new commit adds a new feature (or in the case of the last commit, improves an old one).

I found that Eclipse Buildship really doesn't like our project layout, and so the next PR will switch the project to a standard Gradle layout, but that involves moving every single source file, so... different PR.

codecov[bot] commented 8 months ago

Codecov Report

Merging #419 (8fce168) into develop (09b2011) will not change coverage. Report is 1 commits behind head on develop. The diff coverage is n/a.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #419 +/- ## ========================================== Coverage 93.39% 93.39% Complexity 2142 2142 ========================================== Files 126 126 Lines 7520 7520 Branches 1178 1178 ========================================== Hits 7023 7023 Misses 454 454 Partials 43 43 ```
Xiangs18 commented 8 months ago

@MrCreosote Do you think we are ready to remove .classpath as well?

MrCreosote commented 8 months ago

Do you think we are ready to remove .classpath as well?

It's removed in the next commit after I get Eclipse builds working (with a minor annoyance, but working)

Xiangs18 commented 8 months ago

@MrCreosote I am a little bit confused about 3 tasks: generateTemplateFileList, fatTestJar, and generateManageAuthScript. Could you please explain more why we need each of them?

MrCreosote commented 8 months ago

I am a little bit confused about 3 tasks: generateTemplateFileList, fatTestJar, and generateManageAuthScript. Could you please explain more why we need each of them?

Easy one first: generateManageAuthScript generates this: https://github.com/kbase/auth2/blob/develop/README.md?plain=1#L260

generateTemplateFileList creates a list of all the templates (a manifest) in the templates directory. This is solely to make it easier for the test rig to pull the templates out of the fat test jar, as listing directories inside a jar is unnecessarily difficult.

fatTestJar generates a fat test jar, including all dependencies, the templates, and the templates manifest. The fat jar will replace the current auth jar + the jars repo in workspace and other repos for running an auth2 server in their test rigs. The fat jar is completely self contained, so the jars repo is no longer needed

Xiangs18 commented 8 months ago

@MrCreosote And where will this fat jar locate in the repo? I cannot find it anywhere after running fatTestJar task.

MrCreosote commented 8 months ago

And where will this fat jar locate in the repo? I cannot find it anywhere after running fatTestJar task.

It's in build/libs