Skip to content

feat(quiz_java): Java port of quiz app using codedifferently-instructional - #123

Merged
anthonydmays merged 1 commit into
code-differently:mainfrom
dev-benson-03:devyn_quiz_new
Aug 16, 2025
Merged

feat(quiz_java): Java port of quiz app using codedifferently-instructional#123
anthonydmays merged 1 commit into
code-differently:mainfrom
dev-benson-03:devyn_quiz_new

Conversation

@dev-benson-03

Copy link
Copy Markdown
Contributor

Summary
Quiz questions completed and answered fully
Java port of the quiz assignment in lesson_02/quiz_java, wired to the
lib/java/codedifferently-instructional library.

Changes

  • Added Lesson2.java (builds questions + prints quiz via library)
  • Updated App.java to run Lesson2
  • Added tests: AppTest.java, Lesson2Test.java
  • Gradle config:
    i) Included modules in settings
    ii) App depends on :codedifferently-instructional:instructional-lib

Notes/Problems (I'm trash as ever at Java)
I had two Gradle worlds: a nested build under lesson_02/quiz_java (include("quiz_java")
{ projectDir = file("app") }) and the top-level repo. Running Gradle inside the nested build
made it blind to the library, so dependency lookups failed.

I initially referenced the library by the wrong project path
(e.g., :lib:java:codedifferently-instructional). The library is multi-module;
the actual compile target is :codedifferently-instructional:instructional-lib.
Once I included that exact project in settings.gradle.kts, the dependency resolved.

I mixed up filesystem paths vs Gradle project names. Gradle dependencies are by project name declared in settings.gradle.kts, not by folder path.

@anthonydmays anthonydmays left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You also need to make the updates to the typescript app as well.

@anthonydmays

Copy link
Copy Markdown
Contributor

You also need to make the updates to the typescript app as well.

Nevermind, I see what's going on. I'll submit this PR.

@anthonydmays
anthonydmays merged commit 4d3e396 into code-differently:main Aug 16, 2025
1 check passed
emblue252 pushed a commit to emblue252/code-society-25-2 that referenced this pull request Aug 16, 2025
@dev-benson-03
dev-benson-03 deleted the devyn_quiz_new branch August 18, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants