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

General build upgrades and improvements #1

Draft
wants to merge 177 commits into
base: main
Choose a base branch
from
Draft

Conversation

sgammon
Copy link
Member

@sgammon sgammon commented Feb 19, 2024

Summary

Draft. Coming soon. Probably will not get merged.

Full changelog

  • feat: support for build scans with gradle enterprise
  • feat: support for caching with buildless (inert without key)
  • feat: support for gradle java toolchains
  • feat: support for static analysis with detekt
  • feat: support for toolchain vs. runtime target
  • feat: support for dynamic provisioning of toolchains
  • feat: support for static java checking with pmd
  • feat: enable typed project accessors, use them project-wide
  • feat: stricter repositories, locking for build classpath
  • feat: property to retarget java or kotlin bytecode versions
  • feat: parameter name integration between javac and kotlinc
  • feat: kotlin coverage support via kover plugin
  • feat: dependency verification for gradle build
  • feat: support for new gradle jvm-test-suite plugin
  • feat: reasonable local and remote build caching support
  • feat: project icon in intellij new ui
  • feat: aggregate reporting for tests, coverage, detekt
  • fix: repeatable/consistent archives from gradle
  • fix: don't list ephemeral spotless configurations in lockfiles
  • fix: make version catalog symbols available in buildSrc
  • fix: specify rootProject.name for buildSrc
  • fix: error when running gradlew tasks
  • fix: various java or gradle deprecations
  • fix: move all tool (linter, etc) versions into version catalog
  • chore: add testlogger for clearer test outcomes
  • chore: check build configuration with gradle doctor plugin
  • chore: generate initial suite of dependency verification material
  • chore: transition to property set syntax (property = xyz)
  • chore: cleanup uses of buildDir (becomes layout.buildDirectory)
  • chore: add Gradle Versions plugin for update checks
  • chore: upgrade Gradle → 8.6 (supports Java 21)
  • chore: upgrade Kotlin → 1.9.22 (build-time)
  • chore: upgrade KotlinX Serialization → 1.6.3
  • chore: upgrade KotlinX HTML → 0.11.0
  • chore: general dependency upgrades, where safe

Not yet completed

  • feat: signing of artifacts with sigstore
  • feat: embedding of SPDX SBOM in artifacts
  • feat: dependency vulnerability checks with owasp
  • test: checksum failures

@sgammon sgammon added 🚧 WIP Work-in-progress 🧪 labs Experimental work labels Feb 19, 2024
@sgammon sgammon self-assigned this Feb 19, 2024
buildSrc/src/main/kotlin/BuildInfo.kt Dismissed Show dismissed Hide dismissed
This fixes many "unknown symbol" errors in Java source files.
@sgammon
Copy link
Member Author

sgammon commented Feb 20, 2024

Next batch:

  • feat: refactor buildSrc → composite build
  • feat: move to entrypoint convention for cli
  • chore: project descriptions for gradle
  • chore: restore and align build caching

Access to field "isClosed" must be guarded.
translatenix and others added 11 commits February 20, 2024 20:47
The only call site already resolved the path against tmpDir.
Replace the legacy "compile" scope with "implementation".
This matches Maven Central's recommended syntax:
https://central.sonatype.com/artifact/org.pkl-lang/pkl-core
…s. (apple#218)

This makes the class more closely follow Java conventions.
The referenced filename should be `ispklTutorialPart3.pkl`, not `pklTutorial.pkl`.

Also, changes dates from 2023 to 2024

Co-authored-by: grant-abbott <[email protected]>
Adds an icon for the Pkl project which is used in IDEA's "New UI"
when opening Pkl
This small change fixes a bug introduced by the `validatePom` task
within the `pklPublishLibrary` plugin. When running project-wide
tasks like `./gradle tasks`, projects which don't provide a POM
fail the build, because the `generatePomFileForLibraryPublication`
cannot be found, but it is expected to be present.

Fixes and closes apple#215

Signed-off-by: Sam Gammon <[email protected]>
This change activates the `TYPESAFE_PROJECT_ACCESSORS` feature
preview in Gradle, and switches to such accessors instead of
string-based project references, where possible

Relates-To: apple#204
Signed-off-by: Sam Gammon <[email protected]>
It is customary to separate elements with a semicolon.
- fix: make version catalog accessible from `buildSrc` plugins
- chore: declare `googleFormatVersion` in version catalog
- chore: declare `ktfmt` in version catalog

Relates-To: apple#204
Signed-off-by: Sam Gammon <[email protected]>
@sgammon sgammon force-pushed the chore/build-upgrades branch 3 times, most recently from 72e31b6 to 7bd65d4 Compare February 22, 2024 00:07
Copy link

codecov bot commented Feb 22, 2024

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

Fixes and closes apple#191

Signed-off-by: Sam Gammon <[email protected]>
Adds a setting to the Kotlin code generator which controls the
target Kotlin package for codegen. Applied as a prefix to the
normal generated package name.

The current versions of the `kotlinx.serialization` and
`kotlinx.html` libraries are declared dynamically, which causes
a failure when refreshing dependencies. To avoid Kotlin metadata
build issues, these have been pinned.

- feat(codegen): use `kotlinPackage` as prefix for kotlin codegen
- feat(gradle): `kotlinPackage` property in gradle plugin
- test(codegen): add tests for custom kotlin package
- test(gradle): add tests for generating with custom kotlin package

Signed-off-by: Sam Gammon <[email protected]>
This change adds support for a new code-gen argument,
`implementKSerializable`, which results in the annotation
`kotlinx.serialization.Serializable` being added to `data`
classes during codegen.

Relates to discussion apple#185

- feat(codegen): add support for kotlin `Serializable` annotation
- feat(gradle): add `implementKSerializable` argument
- test(codegen): add test for KotlinX serialization support
- test(codegen): add test for both Java and KotlinX serialization
- test(gradle): add test for compiling with KotlinX serialization

Signed-off-by: Sam Gammon <[email protected]>
- feat: support for build scans with gradle enterprise
- feat: support for caching with buildless (inert without key)
- feat: support for gradle java toolchains
- feat: support for static analysis with detekt
- feat: support for gradle toolchains
- feat: support for toolchain vs. runtime target
- feat: support for dynamic provisioning of toolchains
- feat: support for static java checking with pmd
- feat: enable typed project accessors, use them project-wide
- feat: stricter repositories, locking for build classpath
- feat: property to retarget java or kotlin bytecode versions
- feat: parameter name integration between javac and kotlinc
- feat: kotlin coverage support via `kover` plugin
- feat: dependency verification for gradle build
- feat: support for new gradle `jvm-test-suite` plugin
- feat: reasonable local and remote build caching support
- feat: project icon in intellij new ui
- feat: aggregate reporting for tests, coverage, detekt
- fix: repeatable/consistent archives from gradle
- fix: don't list ephemeral spotless configurations in lockfiles
- fix: make version catalog symbols available in `buildSrc`
- fix: specify `rootProject.name` for `buildSrc`
- fix: error when running `gradlew tasks`
- fix: various java or gradle deprecations
- fix: move all tool (linter, etc) versions into version catalog
- chore: add testlogger for clearer test outcomes
- chore: check build configuration with gradle doctor plugin
- chore: generate initial suite of dependency verification material
- chore: transition to property set syntax (`property = xyz`)
- chore: cleanup uses of `buildDir` (becomes `layout.buildDirectory`)
- chore: add Gradle Versions plugin for update checks
- chore: upgrade Gradle → `8.6` (supports Java 21)
- chore: upgrade Kotlin → `1.9.22` (build-time)
- chore: upgrade KotlinX Serialization → `1.6.3`
- chore: upgrade KotlinX HTML → `0.11.0`
- chore: general dependency upgrades, where safe

Not yet completed:
- feat: signing of artifacts with sigstore
- feat: embedding of SPDX SBOM in artifacts
- feat: dependency vulnerability checks with owasp
- test: checksum failures

Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧪 labs Experimental work 🚧 WIP Work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants