Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GradleUp/shadow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9.0.0-beta6
Choose a base ref
...
head repository: GradleUp/shadow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9.0.0-beta7
Choose a head ref

Commits on Jan 23, 2025

  1. Copy the full SHA
    520e5cf View commit details
  2. Update RELEASING.md

    Goooler committed Jan 23, 2025
    Copy the full SHA
    5247c1e View commit details
  3. Say "Hello, World!" (#1181)

    * Reuse writeMainClass in ApplicationPluginTest
    
    * Tweak writeGradlePluginModule
    Goooler authored Jan 23, 2025
    Copy the full SHA
    ee55936 View commit details
  4. Support overriding mainClass provided by JavaApplication (#1182)

    * Add canOverrideMainClassAttrInManifestBlock
    
    * Check attr key before injecting
    
    * Note this change
    Goooler authored Jan 23, 2025
    Copy the full SHA
    cb08953 View commit details

Commits on Jan 24, 2025

  1. Test start scripts running (#1184)

    * Simplify integrationWithApplicationPluginAndJavaToolchains and shadowApplicationDistributionsShouldUseShadowJar
    
    * Better jar entry checks in shadowApplicationDistributionsShouldUseShadowJar
    
    * Normalize separator for Windows
    
    * Add runProcess
    
    * Depend on junit-3.8.2.jar
    
    * Add walkEntries
    
    * Rename
    
    * Run scripts in runProcess
    
    * Check Class-Path in commonAssertions
    
    * Cleanups
    
    * Remove preCommands for OS
    Goooler authored Jan 24, 2025
    Copy the full SHA
    caf8d89 View commit details
  2. Update start script templates (#1183)

    * Update unixStartScript.txt and windowsStartScript.txt from https://github.com/gradle/gradle/tree/e226beaa17cf21689966bfd4e9cad846ad6ded2d/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins
    
    * Fix integrationWithApplicationPluginAndJavaToolchains and shadowApplicationDistributionsShouldUseShadowJar
    
    * Add downloadStartScripts task
    
    * Run downloadStartScripts for testing
    
    * Check the dest dir
    
    * Update changelog
    
    * Update description
    Goooler authored Jan 24, 2025
    Copy the full SHA
    220809f View commit details
  3. Show how to add extra files into distributions (#1185)

    * Add canAddExtraFilesIntoDistribution
    
    * Update src/docs/application-plugin/README.md
    Goooler authored Jan 24, 2025
    Copy the full SHA
    7594dfe View commit details
  4. Update dependency gradle to v8.12.1 (#1186)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 24, 2025
    Copy the full SHA
    7c76ebc View commit details
  5. Copy the full SHA
    3818ce6 View commit details

Commits on Jan 25, 2025

  1. Declare manifest attributes in sample task (#1189)

    * More checks in canRegisterCustomShadowJarTask
    
    * Update src/docs/custom-tasks/README.md
    
    * Cleanup src/$sourceSet/java/shadow/$className.java
    Goooler authored Jan 25, 2025
    Copy the full SHA
    42b4280 View commit details
  2. Test publish jars that depend on shadow jars (#1190)

    * Replace writeShadowedClientAndServerModules
    
    * Write client version
    
    * Add publishJarThatDependsOnShadowJar
    
    * Renames
    Goooler authored Jan 25, 2025
    Copy the full SHA
    d738e61 View commit details
  3. More robust PublishingTest (#1191)

    * Move gmmAdapter and pomReader into companion object
    
    * Reuse assertShadowVariantCommon
    
    * Private properties in GradleModuleMetadata
    
    * Rename depStrings to gavs
    
    * More tweaks in GradleModuleMetadata
    
    * Add gav extensions for maven model
    
    * Reuse publishingBlock
    
    * Replace contains with containsAtLeast
    
    * Remove private
    
    * Reuse commonVariantAttrs
    
    * Replace containsAtLeast with containsOnly
    
    * Remove TODO
    
    * Use more assertShadowVariantCommon
    
    * Note targetCompatibility usage
    Goooler authored Jan 25, 2025
    Copy the full SHA
    8526847 View commit details
  4. Bump @babel/traverse from 7.22.10 to 7.26.7 (#1192)

    Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.10 to 7.26.7.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.26.7/packages/babel-traverse)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/traverse"
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 25, 2025
    Copy the full SHA
    5fd1478 View commit details
  5. Configure dependabot (#1193)

    * Create dependabot.yml
    
    * Ignore yarn.lock for workflows
    Goooler authored Jan 25, 2025
    Copy the full SHA
    a9b6f46 View commit details

Commits on Jan 26, 2025

  1. Copy the full SHA
    cba99bb View commit details
  2. Revert "Saving configuration-cache data on CI (#1187)"

    This reverts commit 3818ce6.
    Goooler committed Jan 26, 2025
    Copy the full SHA
    28d0431 View commit details
  3. Copy the full SHA
    43142e6 View commit details
  4. Verify DEFAULT_JVM_OPTS in start scripts (#1195)

    * Check applicationDefaultJvmArgs in start scripts
    
    * Update src/docs/application-plugin/README.md
    Goooler authored Jan 26, 2025
    Copy the full SHA
    5708e1a View commit details
  5. Copy the full SHA
    4850db3 View commit details
  6. Inject TargetJvmVersion attr for GMM (#1199)

    * Inject TARGET_JVM_VERSION_ATTRIBUTE for shadow jar
    
    * More checks in publishShadowJar
    
    * Use attributeProvider to track JavaPluginExtension changes
    
    * Update changelog
    
    * Cleanups
    
    * Check sourceCompatibility and simplify assertions
    Goooler authored Jan 26, 2025
    Copy the full SHA
    93004d0 View commit details
  7. Fix ShadowJar not being successful after includes or excludes are cha…

    …nged (#1200)
    
    * Update shadowJarIsCachedCorrectlyWhenUsingIncludesExcludes
    
    * Add internalIncludes and internalExcludes to delegate PatternFilterable methods
    
    * Revert "Add internalIncludes and internalExcludes to delegate PatternFilterable methods"
    
    This reverts commit 4d3f149.
    
    * Just mark includes and excludes as inputs
    
    * Update changelog
    
    * Test more times
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Goooler and Copilot authored Jan 26, 2025
    Copy the full SHA
    450b831 View commit details

Commits on Jan 27, 2025

  1. Address comments and stuffs (#1201)

    * Refine params and comments in DependencyFilter
    
    * Simplify AbstractDependencyFilter
    
    * Replace input marker TODOs
    
    * Override getIncludes and getExcludes explicitly for ShadowJar
    
    * Use getManifest to suppress the warning
    
    * Use MutableSet for Kotlin calls
    
    * Seems no need to indicate configuration to default
    
    * Cleanups
    Goooler authored Jan 27, 2025
    Copy the full SHA
    343da8c View commit details
  2. Copy the full SHA
    7bc393d View commit details
  3. Update plugin kotlin-jvm to v2.1.10 (#1205)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 27, 2025
    Copy the full SHA
    db35be3 View commit details
  4. Get rid of Closure in public APIs (#1203)

    * Replace Closure with Spec in DependencyFilter
    
    * Fix excludeATransitiveProjectDependency
    
    * Remove `DependencyFilter#dependency(Spec<ResolvedDependency>)`, use `exclude` or `include` directly
    
    * Try to replace Closure with JavaFunction in PropertiesFileTransformer
    
    * Rplace Property with Function for keyTransformer
    Goooler authored Jan 27, 2025
    Copy the full SHA
    f08559a View commit details

Commits on Jan 28, 2025

  1. Refine parameterized unit tests (#1207)

    * Remove extra ParameterizedTest names
    
    They are converted from the original Spock tests, we don't need them.
    
    * Unify MethodSource names
    Goooler authored Jan 28, 2025
    Copy the full SHA
    ed7135b View commit details
  2. Polish transformer caching tests (#1209)

    * Use Path.deleteExisting
    
    * Reuse assertions in shadowJarIsCachedCorrectlyWhenUsingServiceFileTransformer
    
    * Reuse assertions in shadowJarIsCachedCorrectlyWhenUsingAppendingTransformer
    
    * Reuse assertions in shadowJarIsCachedCorrectlyWhenUsingXmlAppendingTransformer
    
    * Reuse assertions in shadowJarIsCachedCorrectlyWhenUsingGroovyExtensionModuleTransformer
    
    * Rename TransformCachingTest to TransformerCachingTest
    
    * Reuse writeMainClass
    Goooler authored Jan 28, 2025
    Copy the full SHA
    b6042ae View commit details
  3. More cacheable Transformers (#1210)

    * Add shadowJarIsCachedCorrectlyWhenUsingOtherTransformers
    
    * Mark more transformers cacheable
    
    * Update changelog
    Goooler authored Jan 28, 2025
    Copy the full SHA
    0359eb9 View commit details
  4. Mark ShadowJar.dependencyFilter as Input (#1206)

    * Mark dependencyFilter as Input
    
    * Mark stats as intenral modifier
    
    * Mark DependencyFilter as Serializable
    
    * Mark Transient, Optional, and Input for keyTransformer
    
    * Revert "Mark Transient, Optional, and Input for keyTransformer"
    
    This reverts commit 58564d3.
    
    * Comment it
    
    * Update changelog
    Goooler authored Jan 28, 2025
    Copy the full SHA
    83ca343 View commit details
  5. Shorten caching tests (#1211)

    * Tweak MinimizationCachingTest
    
    * Tweak RelocationCachingTest
    
    * Tweak ShadowJarCachingTest
    Goooler authored Jan 28, 2025
    Copy the full SHA
    529edc1 View commit details
  6. Add a caching test for ShadowJar.dependencyFilter (#1212)

    * Reuse publishArtifactCD
    
    * Add shadowJarIsCachedCorrectlyAfterDependencyFilterChanged
    
    I missed that we can use `MinimizeDependencyFilter` as the fallback for testing.
    Goooler authored Jan 28, 2025
    Copy the full SHA
    3c08e5a View commit details
  7. Copy the full SHA
    15f9676 View commit details
  8. Be friend with functionalTest (#1172)

    * Workaround for https://youtrack.jetbrains.com/issue/KTIJ-7662
    
    * Place `kotlin.target.compilations` after `testing.suites`
    
    * Reuse `requireResourceAsPath`
    
    * Ref `MinimizeDependencyFilter` class name directly
    
    * Remove `implementation sourceSets.main.get().output`
    Goooler authored Jan 28, 2025
    Copy the full SHA
    7a7b4a0 View commit details

Commits on Jan 29, 2025

  1. Copy the full SHA
    d95c378 View commit details
  2. Add a caching test for runShadow (#1214)

    * Test runShadowCachedCorrectlyAfterShadowJarChanged
    
    * Cleanups
    
    * `runTask` is not cacheable, so it's always executed
    
    * Rename to runShadowExecutedCorrectlyAfterShadowJarChanged
    Goooler authored Jan 29, 2025
    Copy the full SHA
    cc89562 View commit details
  3. Replace JavaJarExec with JavaExec (#1197)

    * Remove JavaJarExec
    
    * Fix CC
    
    * Update changelog
    
    * Mark jarFile as a input
    
    * Put jarFile into classpath and still use javaApplication.mainClass as mainClass
    
    * Update checks in canOverrideMainClassAttrInManifestBlock
    Goooler authored Jan 29, 2025
    Copy the full SHA
    3663571 View commit details
  4. Tidy up ShadowApplicationPlugin (#1198)

    * Reuse installShadowDist
    
    * Remove src/dist from
    
    * Revert "Remove src/dist from"
    
    This reverts commit 4f6ca4d.
    
    * Cleanups
    
    * Test canIncludeSrcDistByDefault
    
    * Reuse shadowDistZipTask
    
    * Check `run` result in canOverrideMainClassAttrInManifestBlock
    
    * Test startShadowScriptsExecutedCorrectlyAfterShadowJarChanged
    
    * Revert "Test startShadowScriptsExecutedCorrectlyAfterShadowJarChanged"
    
    This reverts commit 9fa1499.
    Goooler authored Jan 29, 2025
    Copy the full SHA
    ac2c5f7 View commit details
  5. Copy the full SHA
    046dce5 View commit details
  6. Use more extensions on TaskContainer and Project (#1217)

    * Add extensions for project ExtensionContainer
    
    * Add extensions for project TaskContainer
    
    * Remove explicit dependsOn
    
    * Move configuring logic into project extensions
    
    * Simplify ShadowPlugin.apply
    
    * Cleanups
    Goooler authored Jan 29, 2025
    Copy the full SHA
    6a0bca8 View commit details

Commits on Jan 30, 2025

  1. Update dependency com.gradle.publish:plugin-publish-plugin to v1.3.1 (#…

    …1219)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 30, 2025
    Copy the full SHA
    d64ef37 View commit details

Commits on Feb 2, 2025

  1. Copy the full SHA
    ea5d873 View commit details
  2. Update dependency org.vafer:jdependency to v2.12 (#1222)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 2, 2025
    Copy the full SHA
    c24a570 View commit details
  3. Prepare changelog for version 8.3.6

    (cherry picked from commit 360e9db)
    Goooler committed Feb 2, 2025
    Copy the full SHA
    50f92dd View commit details
  4. Prepare version 9.0.0-beta7

    Goooler committed Feb 2, 2025
    Copy the full SHA
    22b9ba6 View commit details
Showing with 1,785 additions and 960 deletions.
  1. +11 −0 .github/dependabot.yml
  2. +3 −0 .github/renovate.json5
  3. +4 −0 .github/workflows/ci.yml
  4. +8 −8 RELEASING.md
  5. +19 −22 api/shadow.api
  6. +26 −2 build.gradle.kts
  7. +2 −2 gradle.properties
  8. +3 −3 gradle/libs.versions.toml
  9. +1 −1 gradle/wrapper/gradle-wrapper.properties
  10. +1 −1 src/docs/.vuepress/config.js
  11. +28 −1 src/docs/application-plugin/README.md
  12. +39 −1 src/docs/changes/README.md
  13. +7 −1 src/docs/custom-tasks/README.md
  14. +216 −56 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/ApplicationPluginTest.kt
  15. +64 −17 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/BasePluginTest.kt
  16. +1 −17 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt
  17. +23 −29 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/JavaPluginTest.kt
  18. +180 −68 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/PublishingTest.kt
  19. +81 −0 ...unctionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/caching/ApplicationCachingTest.kt
  20. +15 −11 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/caching/BaseCachingTest.kt
  21. +16 −22 ...nctionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/caching/MinimizationCachingTest.kt
  22. +15 −21 ...functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/caching/RelocationCachingTest.kt
  23. +127 −62 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/caching/ShadowJarCachingTest.kt
  24. +0 −167 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/caching/TransformCachingTest.kt
  25. +193 −0 ...unctionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/caching/TransformerCachingTest.kt
  26. +4 −4 ...functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/TransformersTest.kt
  27. +6 −0 ...unctionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/util/AppendableMavenRepository.kt
  28. +27 −2 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/util/GradleModuleMetadata.kt
  29. +19 −0 src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/util/RunProcess.kt
  30. +78 −77 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.kt
  31. +6 −0 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugin.kt
  32. +76 −53 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.kt
  33. +7 −7 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowPlugin.kt
  34. +9 −43 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/AbstractDependencyFilter.kt
  35. +13 −17 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/DependencyFilter.kt
  36. +26 −0 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/GradleCompat.kt
  37. +9 −0 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/Utils.kt
  38. +0 −22 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/JavaJarExec.kt
  39. +13 −8 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.kt
  40. +0 −3 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowSpec.kt
  41. +1 −0 ...otlin/com/github/jengelman/gradle/plugins/shadow/transformers/ApacheLicenseResourceTransformer.kt
  42. +1 −0 ...kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ApacheNoticeResourceTransformer.kt
  43. +1 −0 ...otlin/com/github/jengelman/gradle/plugins/shadow/transformers/ComponentsXmlResourceTransformer.kt
  44. +1 −0 .../kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/DontIncludeResourceTransformer.kt
  45. +1 −0 ...main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/IncludeResourceTransformer.kt
  46. +1 −0 ...ain/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ManifestAppenderTransformer.kt
  47. +1 −0 ...ain/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ManifestResourceTransformer.kt
  48. +5 −5 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/PropertiesFileTransformer.kt
  49. +4 −10 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ServiceFileTransformer.kt
  50. +0 −4 src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.kt
  51. +218 −109 src/main/resources/com/github/jengelman/gradle/plugins/shadow/internal/unixStartScript.txt
  52. +44 −34 src/main/resources/com/github/jengelman/gradle/plugins/shadow/internal/windowsStartScript.txt
  53. +5 −4 .../com/github/jengelman/gradle/plugins/shadow/transformers/Log4j2PluginsCacheFileTransformerTest.kt
  54. +21 −26 ...t/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/PropertiesFileTransformerTest.kt
  55. +6 −6 ...test/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/ServiceFileTransformerTest.kt
  56. +99 −14 yarn.lock
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
3 changes: 3 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -3,4 +3,7 @@
extends: [
'config:recommended',
],
"labels": [
"dependencies",
],
}
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,11 @@ on:
push:
branches:
- main
paths-ignore:
- yarn.lock
pull_request:
paths-ignore:
- yarn.lock
workflow_dispatch:

jobs:
16 changes: 8 additions & 8 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -12,28 +12,28 @@

4. Commit

```
$ git commit -am "Prepare version X.Y.Z"
```sh
git commit -am "Prepare version X.Y.Z"
```

5. Tag

```
$ git tag -am "Version X.Y.Z" X.Y.Z
```sh
git tag -am "Version X.Y.Z" X.Y.Z
```

6. Update the `VERSION_NAME` in `gradle.properties` to the next "SNAPSHOT" version.

7. Commit

```
$ git commit -am "Prepare next development version"
```sh
git commit -am "Prepare next development version"
```

8. Push!

```
$ git push && git push --tags
```sh
git push && git push --tags
```

This will trigger a GitHub Action workflow which will create a GitHub release and upload the
41 changes: 19 additions & 22 deletions api/shadow.api
Original file line number Diff line number Diff line change
@@ -4,17 +4,18 @@ public abstract class com/github/jengelman/gradle/plugins/shadow/ShadowApplicati
public static final field SHADOW_RUN_TASK_NAME Ljava/lang/String;
public static final field SHADOW_SCRIPTS_TASK_NAME Ljava/lang/String;
public fun <init> ()V
protected fun addCreateScriptsTask ()V
protected fun addRunTask ()V
protected fun addCreateScriptsTask (Lorg/gradle/api/Project;)V
protected fun addRunTask (Lorg/gradle/api/Project;)V
public synthetic fun apply (Ljava/lang/Object;)V
public fun apply (Lorg/gradle/api/Project;)V
protected fun configureDistSpec ()V
protected fun configureInstallTask ()V
protected fun configureJarMainClass ()V
protected final fun getShadowJar ()Lorg/gradle/api/tasks/TaskProvider;
protected fun configureDistSpec (Lorg/gradle/api/Project;)V
protected fun configureInstallTask (Lorg/gradle/api/Project;)V
protected fun configureJarMainClass (Lorg/gradle/api/Project;)V
}

public final class com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin$Companion {
public final fun getInstallShadowDist (Lorg/gradle/api/tasks/TaskContainer;)Lorg/gradle/api/tasks/TaskProvider;
public final fun getStartShadowScripts (Lorg/gradle/api/tasks/TaskContainer;)Lorg/gradle/api/tasks/TaskProvider;
}

public abstract class com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugin : org/gradle/api/Plugin {
@@ -31,6 +32,7 @@ public abstract class com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugi
}

public final class com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugin$Companion {
public final fun getShadow (Lorg/gradle/api/artifacts/ConfigurationContainer;)Lorg/gradle/api/NamedDomainObjectProvider;
}

public abstract class com/github/jengelman/gradle/plugins/shadow/ShadowExtension {
@@ -45,9 +47,15 @@ public abstract class com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugi
public fun <init> (Lorg/gradle/api/component/SoftwareComponentFactory;)V
public synthetic fun apply (Ljava/lang/Object;)V
public fun apply (Lorg/gradle/api/Project;)V
protected fun configureComponents (Lorg/gradle/api/Project;)V
protected fun configureConfigurations (Lorg/gradle/api/Project;)V
protected fun configureJavaGradlePlugin (Lorg/gradle/api/Project;)V
protected fun configureShadowJar (Lorg/gradle/api/Project;)V
}

public final class com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin$Companion {
public final fun getShadowJar (Lorg/gradle/api/tasks/TaskContainer;)Lorg/gradle/api/tasks/TaskProvider;
public final fun getShadowRuntimeElements (Lorg/gradle/api/artifacts/ConfigurationContainer;)Lorg/gradle/api/NamedDomainObjectProvider;
}

public abstract class com/github/jengelman/gradle/plugins/shadow/ShadowPlugin : org/gradle/api/Plugin {
@@ -91,8 +99,7 @@ public class com/github/jengelman/gradle/plugins/shadow/impl/RelocatorRemapper :
public fun mapValue (Ljava/lang/Object;)Ljava/lang/Object;
}

public abstract interface class com/github/jengelman/gradle/plugins/shadow/internal/DependencyFilter {
public abstract fun dependency (Lgroovy/lang/Closure;)Lorg/gradle/api/specs/Spec;
public abstract interface class com/github/jengelman/gradle/plugins/shadow/internal/DependencyFilter : java/io/Serializable {
public abstract fun dependency (Ljava/lang/Object;)Lorg/gradle/api/specs/Spec;
public abstract fun dependency (Lorg/gradle/api/artifacts/Dependency;)Lorg/gradle/api/specs/Spec;
public abstract fun exclude (Lorg/gradle/api/specs/Spec;)Lcom/github/jengelman/gradle/plugins/shadow/internal/DependencyFilter;
@@ -226,12 +233,6 @@ public abstract interface class com/github/jengelman/gradle/plugins/shadow/tasks
public abstract fun inheritFrom ([Ljava/lang/Object;Lorg/gradle/api/Action;)Lcom/github/jengelman/gradle/plugins/shadow/tasks/InheritManifest;
}

public abstract class com/github/jengelman/gradle/plugins/shadow/tasks/JavaJarExec : org/gradle/api/tasks/JavaExec {
public fun <init> ()V
public fun exec ()V
public abstract fun getJarFile ()Lorg/gradle/api/file/RegularFileProperty;
}

public abstract class com/github/jengelman/gradle/plugins/shadow/tasks/KnowsTask : org/gradle/api/DefaultTask {
public static final field Companion Lcom/github/jengelman/gradle/plugins/shadow/tasks/KnowsTask$Companion;
public static final field DESC Ljava/lang/String;
@@ -307,7 +308,9 @@ public abstract class com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar
public fun getConfigurations ()Lorg/gradle/api/provider/SetProperty;
public fun getDependencyFilter ()Lorg/gradle/api/provider/Property;
public fun getEnableRelocation ()Lorg/gradle/api/provider/Property;
public fun getExcludes ()Ljava/util/Set;
public fun getIncludedDependencies ()Lorg/gradle/api/file/ConfigurableFileCollection;
public fun getIncludes ()Ljava/util/Set;
protected fun getInternalCompressor ()Lcom/github/jengelman/gradle/plugins/shadow/internal/ZipCompressor;
public fun getManifest ()Lcom/github/jengelman/gradle/plugins/shadow/tasks/InheritManifest;
public synthetic fun getManifest ()Lorg/gradle/api/java/archives/Manifest;
@@ -316,7 +319,6 @@ public abstract class com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar
public fun getRelocators ()Lorg/gradle/api/provider/SetProperty;
protected fun getRootPatternSet ()Lorg/gradle/api/tasks/util/PatternSet;
public fun getSourceSetsClassesDirs ()Lorg/gradle/api/file/ConfigurableFileCollection;
public fun getStats ()Lcom/github/jengelman/gradle/plugins/shadow/ShadowStats;
public fun getToMinimize ()Lorg/gradle/api/file/ConfigurableFileCollection;
public fun getTransformers ()Lorg/gradle/api/provider/SetProperty;
public fun mergeGroovyExtensionModules ()Lcom/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar;
@@ -353,7 +355,6 @@ public abstract interface class com/github/jengelman/gradle/plugins/shadow/tasks
public abstract fun append (Ljava/lang/String;)Lcom/github/jengelman/gradle/plugins/shadow/tasks/ShadowSpec;
public abstract fun append (Ljava/lang/String;Ljava/lang/String;)Lcom/github/jengelman/gradle/plugins/shadow/tasks/ShadowSpec;
public abstract fun dependencies (Lorg/gradle/api/Action;)Lcom/github/jengelman/gradle/plugins/shadow/tasks/ShadowSpec;
public abstract fun getStats ()Lcom/github/jengelman/gradle/plugins/shadow/ShadowStats;
public abstract fun mergeGroovyExtensionModules ()Lcom/github/jengelman/gradle/plugins/shadow/tasks/ShadowSpec;
public abstract fun mergeServiceFiles ()Lcom/github/jengelman/gradle/plugins/shadow/tasks/ShadowSpec;
public abstract fun mergeServiceFiles (Ljava/lang/String;)Lcom/github/jengelman/gradle/plugins/shadow/tasks/ShadowSpec;
@@ -517,14 +518,15 @@ public class com/github/jengelman/gradle/plugins/shadow/transformers/PropertiesF
public fun <init> (Lorg/gradle/api/model/ObjectFactory;)V
public fun canTransformResource (Lorg/gradle/api/file/FileTreeElement;)Z
public fun getCharsetName ()Lorg/gradle/api/provider/Property;
public fun getKeyTransformer ()Lorg/gradle/api/provider/Property;
public fun getKeyTransformer ()Lkotlin/jvm/functions/Function1;
public fun getMappings ()Lorg/gradle/api/provider/MapProperty;
public fun getMergeSeparator ()Lorg/gradle/api/provider/Property;
public fun getMergeStrategy ()Lorg/gradle/api/provider/Property;
public final fun getObjectFactory ()Lorg/gradle/api/model/ObjectFactory;
public fun getPaths ()Lorg/gradle/api/provider/SetProperty;
public fun hasTransformedResource ()Z
public fun modifyOutputStream (Lorg/apache/tools/zip/ZipOutputStream;Z)V
public fun setKeyTransformer (Lkotlin/jvm/functions/Function1;)V
public fun transform (Lcom/github/jengelman/gradle/plugins/shadow/transformers/TransformerContext;)V
}

@@ -630,8 +632,6 @@ public final class com/github/jengelman/gradle/plugins/shadow/transformers/Trans
}

public class com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer : com/github/jengelman/gradle/plugins/shadow/transformers/Transformer {
public static final field Companion Lcom/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer$Companion;
public static final field XSI_NS Ljava/lang/String;
public fun <init> (Lorg/gradle/api/model/ObjectFactory;)V
public fun canTransformResource (Lorg/gradle/api/file/FileTreeElement;)Z
public fun getIgnoreDtd ()Lorg/gradle/api/provider/Property;
@@ -642,6 +642,3 @@ public class com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendin
public fun transform (Lcom/github/jengelman/gradle/plugins/shadow/transformers/TransformerContext;)V
}

public final class com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer$Companion {
}

28 changes: 26 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -105,8 +105,6 @@ testing.suites {
}
}
dependencies {
// Seems we can't ref project() here due to some limitations of rootProject.
implementation(sourceSets.main.get().output)
implementation(libs.apache.maven.modelBuilder)
implementation(libs.moshi)
implementation(libs.moshi.kotlin)
@@ -127,6 +125,15 @@ testing.suites {
}
}

// This part should be placed after testing.suites to ensure the test sourceSets are created.
kotlin.target.compilations {
val main by getting
val functionalTest by getting {
// TODO: https://youtrack.jetbrains.com/issue/KTIJ-7662
associateWith(main)
}
}

gradlePlugin {
testSourceSets(
sourceSets["functionalTest"],
@@ -145,6 +152,23 @@ tasks.check {
dependsOn(tasks.withType<Test>())
}

tasks.register<Copy>("downloadStartScripts") {
description = "Download start scripts from Gradle sources, this should be run intervally to track updates."

val urlPrefix = "https://raw.githubusercontent.com/gradle/gradle/refs/heads/master/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins"
from(resources.text.fromUri("$urlPrefix/unixStartScript.txt")) {
rename { "unixStartScript.txt" }
}
from(resources.text.fromUri("$urlPrefix/windowsStartScript.txt")) {
rename { "windowsStartScript.txt" }
}
val destDir = file("src/main/resources/com/github/jengelman/gradle/plugins/shadow/internal")
if (!destDir.exists() || !destDir.isDirectory || destDir.listFiles().isNullOrEmpty()) {
error("Download destination dir $destDir does not exist or is empty.")
}
into(destDir)
}

tasks.clean {
val includedBuilds = gradle.includedBuilds
dependsOn(includedBuilds.map { it.task(path) })
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -5,13 +5,13 @@ kotlin.stdlib.default.dependency=false
org.gradle.caching=true
org.gradle.configuration-cache=true
org.gradle.configuration-cache.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx4g -XX:MaxMetaspaceSize=2g
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx4g
org.gradle.kotlin.dsl.allWarningsAsErrors=true
org.gradle.parallel=true

GROUP=com.gradleup.shadow
POM_ARTIFACT_ID=shadow-gradle-plugin
VERSION_NAME=9.0.0-beta6
VERSION_NAME=9.0.0-beta7

SONATYPE_AUTOMATIC_RELEASE=true
SONATYPE_HOST=DEFAULT
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ apache-commonsIo = "commons-io:commons-io:2.18.0"
apache-log4j = "org.apache.logging.log4j:log4j-core:2.24.3"
apache-maven-modelBuilder = "org.apache.maven:maven-model-builder:3.9.9"
asm = "org.ow2.asm:asm-commons:9.7.1"
jdependency = "org.vafer:jdependency:2.11"
jdependency = "org.vafer:jdependency:2.12"
jdom2 = "org.jdom:jdom2:2.0.6.1"
plexus-utils = "org.codehaus.plexus:plexus-utils:4.0.2"
plexus-xml = "org.codehaus.plexus:plexus-xml:4.0.4"
@@ -16,7 +16,7 @@ moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" }
foojayResolver = "org.gradle.toolchains.foojay-resolver-convention:org.gradle.toolchains.foojay-resolver-convention.gradle.plugin:0.9.0"

pluginPublish = "com.gradle.publish:plugin-publish-plugin:1.3.0"
pluginPublish = "com.gradle.publish:plugin-publish-plugin:1.3.1"
mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.30.0"
gitPublish = "org.ajoberstar.git-publish:gradle-git-publish:5.1.0"
jetbrains-dokka = "org.jetbrains.dokka:dokka-gradle-plugin:2.0.0"
@@ -30,7 +30,7 @@ junit-bom = "org.junit:junit-bom:5.11.4"
assertk = "com.willowtreeapps.assertk:assertk:0.28.1"

[plugins]
kotlin-jvm = "org.jetbrains.kotlin.jvm:2.1.0"
kotlin-jvm = "org.jetbrains.kotlin.jvm:2.1.10"
android-lint = "com.android.lint:8.8.0"
jetbrains-bcv = "org.jetbrains.kotlinx.binary-compatibility-validator:0.17.0"
spotless = "com.diffplug.spotless:7.0.2"
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion src/docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -2,14 +2,14 @@ module.exports = {
base: "/shadow/",
dest: "build/site",
ga: "UA-321220-4",
title: 'Gradle Shadow Plugin',
themeConfig: {
repo: "GradleUp/shadow",
docsBranch: 'main',
editLinks: true,
editLinkText: 'Help improve these docs!',
logo: '/logo+type.svg',
docsDir: 'src/docs',
title: 'Gradle Shadow Plugin',
nav: [
{ text: 'User Guide', link: '/introduction/' }
],
29 changes: 28 additions & 1 deletion src/docs/application-plugin/README.md
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ application {
mainClass = 'myapp.Main'
}
tasks.named('runShadow', com.github.jengelman.gradle.plugins.shadow.tasks.JavaJarExec) {
tasks.named('runShadow', JavaExec) {
args 'foo'
}
```
@@ -55,3 +55,30 @@ the application.

Additionally, the plugin will create the `installShadowDist` and `startShadowScripts` tasks which stages the necessary
files for a distribution to `build/install/<project name>-shadow/`.

You can also add more files into the distribution like:

```groovy
// Add extra files to the distribution
plugins {
id 'java'
id 'application'
id 'com.gradleup.shadow'
}
application {
mainClass = 'myapp.Main'
// Optionally, you can add default JVM arguments to the start scripts like this:
applicationDefaultJvmArgs = ['--add-opens=java.base/java.lang=ALL-UNNAMED']
}
// `shadow` is the name of the distribution created by Shadow plugin
distributions.named('shadow') {
contents.into('extra') {
from project.file('extra/echo.sh')
}
}
```

View [the official doc described](https://docs.gradle.org/current/userguide/distribution_plugin.html#distribution_plugin)
for more information about configuring distributions.
Loading