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

Gradle rework and example project #60

Merged
merged 16 commits into from
Jan 10, 2025
Merged

Gradle rework and example project #60

merged 16 commits into from
Jan 10, 2025

Conversation

Jolanrensen
Copy link
Owner

@Jolanrensen Jolanrensen commented Jan 6, 2025

Helps with #59 and #64

Provides two example projects, one which was used in the demo video.

Creates this new Gradle notation:

kodex { // : KodexExtension
    preprocess(kotlin.sourceSets["mySourceSet"]) {
        generateJar = true
        generateSourcesJar = true
        processors = listOf(
             ...
        )
        ...
    }
}

which will:

  • Attaches KoDEx to the given [sourceSet].
  • Creates a new SourceSet named "${sourceSetName}Kodex" by default ([KodexSourceSetTaskCreator.newSourceSetName]).
  • Creates a new task for the given source set named "preprocess${newSourceSetName}" by default ([KodexSourceSetTaskCreator.taskName]).
  • This task will preprocess the given source set and store the results at
    build/kodex/$newSourceSetName by default ([KodexSourceSetTaskCreator.target]).
  • Creates a jar task if [sourceSet] is the main source set, and we're not multiplatform
    ([KodexSourceSetTaskCreator.generateJar]).
  • Creates a sources jar task if [sourceSet] is the main source set, and we're not multiplatform
    ([KodexSourceSetTaskCreator.generateSourcesJar]).

Refactored a lot on the gradle plugin side

@Jolanrensen Jolanrensen changed the title Example gradle project Gradle rework and example project Jan 7, 2025
@Jolanrensen Jolanrensen added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 8, 2025
@Jolanrensen Jolanrensen force-pushed the example-gradle-project branch from ed24605 to 2edf082 Compare January 9, 2025 13:55
@Jolanrensen Jolanrensen force-pushed the example-gradle-project branch from 2edf082 to ec9dbdd Compare January 9, 2025 14:21
@Jolanrensen Jolanrensen force-pushed the example-gradle-project branch 3 times, most recently from 634afc5 to cccf9ba Compare January 10, 2025 15:54
@Jolanrensen Jolanrensen force-pushed the example-gradle-project branch from cccf9ba to ced28f1 Compare January 10, 2025 15:56
@Jolanrensen Jolanrensen marked this pull request as ready for review January 10, 2025 16:15
@Jolanrensen Jolanrensen merged commit 339b2db into main Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant