Skip to content

Commit

Permalink
Get rid of applying Shadow plugin for itself (#967)
Browse files Browse the repository at this point in the history
```sh
dua .m2/repository/com/gradleup/shadow/shadow-gradle-plugin/8.3.1-SNAPSHOT/
   4.10 KB maven-metadata-local.xml
   4.10 KB shadow-gradle-plugin-8.3.1-SNAPSHOT-all.jar.asc
   4.10 KB shadow-gradle-plugin-8.3.1-SNAPSHOT-javadoc.jar.asc
   4.10 KB shadow-gradle-plugin-8.3.1-SNAPSHOT-sources.jar.asc
   4.10 KB shadow-gradle-plugin-8.3.1-SNAPSHOT.jar.asc
   4.10 KB shadow-gradle-plugin-8.3.1-SNAPSHOT.module.asc
   4.10 KB shadow-gradle-plugin-8.3.1-SNAPSHOT.pom
   4.10 KB shadow-gradle-plugin-8.3.1-SNAPSHOT.pom.asc
   8.19 KB shadow-gradle-plugin-8.3.1-SNAPSHOT.module
  65.54 KB shadow-gradle-plugin-8.3.1-SNAPSHOT-sources.jar
  90.11 KB shadow-gradle-plugin-8.3.1-SNAPSHOT-javadoc.jar
 368.64 KB shadow-gradle-plugin-8.3.1-SNAPSHOT.jar
   8.49 MB shadow-gradle-plugin-8.3.1-SNAPSHOT-all.jar
   9.06 MB total

dua .m2/repository/com/gradleup/shadow/shadow-gradle-plugin/8.3.2-SNAPSHOT/
   4.10 KB maven-metadata-local.xml
   4.10 KB shadow-gradle-plugin-8.3.2-SNAPSHOT-javadoc.jar.asc
   4.10 KB shadow-gradle-plugin-8.3.2-SNAPSHOT-sources.jar.asc
   4.10 KB shadow-gradle-plugin-8.3.2-SNAPSHOT.jar.asc
   4.10 KB shadow-gradle-plugin-8.3.2-SNAPSHOT.module.asc
   4.10 KB shadow-gradle-plugin-8.3.2-SNAPSHOT.pom
   4.10 KB shadow-gradle-plugin-8.3.2-SNAPSHOT.pom.asc
   8.19 KB shadow-gradle-plugin-8.3.2-SNAPSHOT.module
  65.54 KB shadow-gradle-plugin-8.3.2-SNAPSHOT-sources.jar
  90.11 KB shadow-gradle-plugin-8.3.2-SNAPSHOT-javadoc.jar
 368.64 KB shadow-gradle-plugin-8.3.2-SNAPSHOT.jar
 561.15 KB total
```

```diff
diff shadow-gradle-plugin-8.3.1-SNAPSHOT.pom shadow-gradle-plugin-8.3.2-SNAPSHOT.pom

12c12
<   <version>8.3.1-SNAPSHOT</version>
---
>   <version>8.3.2-SNAPSHOT</version>
97,103d96
<     <dependency>
<       <groupId>org.codehaus.groovy</groupId>
<       <artifactId>groovy-backports-compat23</artifactId>
<       <version>3.0.8</version>
<       <scope>compile</scope>
<       <optional>true</optional>
<     </dependency>
```

```diff
diffuse diff --jar shadow-gradle-plugin-8.3.1-SNAPSHOT.jar shadow-gradle-plugin-8.3.2-SNAPSHOT.jar

OLD: shadow-gradle-plugin-8.3.1-SNAPSHOT.jar
NEW: shadow-gradle-plugin-8.3.2-SNAPSHOT.jar

 JAR   │ old       │ new       │ diff
───────┼───────────┼───────────┼──────────
 class │ 737.7 KiB │ 740.3 KiB │ +2.5 KiB
 other │  10.6 KiB │  10.7 KiB │    +89 B
───────┼───────────┼───────────┼──────────
 total │ 748.3 KiB │ 750.9 KiB │ +2.6 KiB

 CLASSES │ old  │ new  │ diff
─────────┼──────┼──────┼────────────
 classes │  154 │  155 │ +1 (+1 -0)
 methods │ 1909 │ 1917 │ +8 (+8 -0)
  fields │  796 │  801 │ +5 (+5 -0)

=================
====   JAR   ====
=================

 size    │ diff     │ path
─────────┼──────────┼─────────────────────────────────────────────────────────────────────────────────
 2.4 KiB │ +2.4 KiB │ + com/github/jengelman/gradle/plugins/shadow/legacy/LegacyShadowPlugin.class
    89 B │    +89 B │ + META-INF/gradle-plugins/com.github.johnrengelman.shadow.properties
     0 B │      0 B │ + com/github/jengelman/gradle/plugins/shadow/legacy/
 3.7 KiB │   +122 B │ ∆ com/github/jengelman/gradle/plugins/shadow/ShadowPlugin$_apply_closure1.class
─────────┼──────────┼─────────────────────────────────────────────────────────────────────────────────
 6.2 KiB │ +2.6 KiB │ (total)


=====================
====   CLASSES   ====
=====================

CLASSES:

   old │ new │ diff
  ─────┼─────┼────────────
   154 │ 155 │ +1 (+1 -0)

  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin


METHODS:

   old  │ new  │ diff
  ──────┼──────┼────────────
   1909 │ 1917 │ +8 (+8 -0)

  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin $createCallSiteArray() → CallSiteArray
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin $getCallSiteArray() → CallSite[]
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin $getStaticMetaClass() → MetaClass
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin <init>()
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin apply(Object)
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin apply(Project)
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin getMetaClass() → MetaClass
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin setMetaClass(MetaClass)


FIELDS:

   old │ new │ diff
  ─────┼─────┼────────────
   796 │ 801 │ +5 (+5 -0)

  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin $callSiteArray: SoftReference
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin $staticClassInfo: ClassInfo
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin $staticClassInfo$: ClassInfo
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin __$stMC: boolean
  + com.github.jengelman.gradle.plugins.shadow.legacy.LegacyShadowPlugin metaClass: MetaClass
```
  • Loading branch information
Goooler authored Sep 11, 2024
1 parent 54d4c95 commit 0967c74
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 74 deletions.
12 changes: 0 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id 'groovy'
id 'project-report'
Expand All @@ -12,8 +9,6 @@ plugins {
id 'com.vanniktech.maven.publish' version "0.29.0"
}

apply plugin: ShadowPlugin

apply from: file('gradle/docs.gradle')
apply from: file('gradle/publish.gradle')
apply from: file('gradle/vuepress.gradle')
Expand Down Expand Up @@ -55,13 +50,6 @@ tasks.withType(Test).configureEach {
)
}

tasks.named('shadowJar', ShadowJar) {
from rootProject.file('LICENSE')
from rootProject.file('NOTICE')
enableRelocation true
archiveClassifier = ''
}

tasks.named('ideaModule') {
notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/13480")
}
56 changes: 0 additions & 56 deletions buildSrc/build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dependencies {
compileOnly localGroovy()
shadow 'org.codehaus.groovy:groovy-backports-compat23:3.0.8'

implementation 'org.jdom:jdom2:2.0.6.1'
implementation 'org.ow2.asm:asm:9.7'
Expand Down
5 changes: 0 additions & 5 deletions gradle/docs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ def javaApiUrl = 'https://docs.oracle.com/javase/17/docs/api'
def groovyApiUrl = "https://docs.groovy-lang.org/2.4.7/html/gapi/"

tasks.withType(Javadoc).configureEach {
classpath += project.configurations.shadow
options.links(javaApiUrl, groovyApiUrl)
if (JavaVersion.current().java8Compatible) {
options.addStringOption('Xdoclint:none', '-quiet')
Expand All @@ -14,8 +13,4 @@ java {
withSourcesJar()
}

tasks.named('groovydoc') {
classpath += project.configurations.shadow
}

tasks.named('build') { dependsOn javadocJar, sourcesJar }
2 changes: 2 additions & 0 deletions src/docs/changes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

**Fixed**

- Stop publishing Shadow self fat jar to Maven repository. ([#967](https://github.com/GradleUp/shadow/pull/967))


## [v8.3.1]

Expand Down

0 comments on commit 0967c74

Please sign in to comment.