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

Support including project dependencies in the dev bundle #163

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

Conversation

jpenilla
Copy link
Member

@jpenilla jpenilla commented Sep 23, 2022

Removes need to special case api & mojangapi, keeps versions in sync, and allows more flexibility for including own project dependencies (forks)

closes #162

known issue:
Included project dependency sources don't auto-attach in intellij on sync, it's needed to open a class and press "Download Sources". Any help with debugging this is greatly appreciated!

current paper changes:

Index: build.gradle.kts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle.kts b/build.gradle.kts
--- a/build.gradle.kts	(revision 339e85d4915a7cfa0066e89c0ffa3ea7b983493d)
+++ b/build.gradle.kts	(date 1663909771039)
@@ -5,7 +5,7 @@
     java
     `maven-publish`
     id("com.github.johnrengelman.shadow") version "7.1.2" apply false
-    id("io.papermc.paperweight.core") version "1.3.8"
+    id("io.papermc.paperweight.core") version "1.4.0-LOCAL-SNAPSHOT"
 }
 
 allprojects {
@@ -99,15 +99,24 @@
             "org.spigotmc",
         )
     }
-}
 
-tasks.generateDevelopmentBundle {
-    apiCoordinates.set("io.papermc.paper:paper-api")
-    mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
-    libraryRepositories.addAll(
-        "https://repo.maven.apache.org/maven2/",
-        paperMavenPublicUrl,
-    )
+    devBundle {
+        libraryRepositories.addAll(
+            "https://repo.maven.apache.org/maven2/",
+            paperMavenPublicUrl,
+        )
+
+        registerProjectPublication(
+            project(":paper-api"),
+            "maven",
+            "io.papermc.paper:paper-api:$version"
+        )
+        registerProjectPublication(
+            project(":paper-mojangapi"),
+            "maven",
+            "io.papermc.paper:paper-mojangapi:$version"
+        )
+    }
 }
 
 publishing {

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.

Question regrading weird behavior if intended or not
1 participant