A Mindustry modding gradle plugin, named Plumy.

Overview

Mindustry Gradle Plugin

Gradle Plugin Portal Discord

A Mindustry gradle plugin, named Plumy. Homepage


Features

  • Manage the Dependencies
  • Download the Game
  • Debug your Mod
  • Work with Other Mods
  • Separate Working Space
  • Manage your Assets
  • Generate Resource Class
  • Deploy on Android

Please check the homepage to obtain more information.

How to Use

Please make sure to always upgrade MGPP to the latest version Gradle Plugin Portal.

Groovy as DSL
  • Using the plugins DSL:
    plugins {
        id "io.github.liplum.mgpp" version "<version>"
    }
  • Using legacy plugin application:
    buildscript {
        repositories {
            maven {
                url "https://plugins.gradle.org/m2/"
            }
        }
        dependencies {
            classpath "io.github.liplum.mgpp:MindustryGradlePluginPlumy:<version>"
        }
    }
    
    apply plugin: "io.github.liplum.mgpp"
Kotlin as DSL
  • Using the plugins DSL:
    plugins {
      id("io.github.liplum.mgpp") version "<version>"
    }
  • Using legacy plugin application:
    buildscript {
        repositories {
            maven { url = uri("https://plugins.gradle.org/m2/") }
        }
        dependencies {
            classpath("io.github.liplum.mgpp:MindustryGradlePluginPlumy:<version>")
        }
    }
    
    apply(plugin = "io.github.liplum.mgpp")

Documentation

Because this plugin was made in Kotlin, using Kotlin as your DSL is recommended.

Pages Instances
Usages Groovy DSL, Kotlin DSL
Samples Groovy Sample, Kotlin Sample
Mod Templates MDT Mod Template

License

GNU General Public License v3.0 (GPL 3.0)

Comments
  • README Formatting

    README Formatting





    Badge Suggestions




    Badge Changes

    • General formatting / spacing

    • Added license badge

    • Added quicklinks

    • Moved usage / documentation hub into dedicated files

      Btw, the links to your GitHub Pages site for groovy & kotlin dsl are broken, well the pages are.

    • Fixed license filename



    Badge Ask

    • If you have any questions.

    • In case you do not agree with some of the changes made in this PR, please first let me know about them, before disregarding it entirely so we can possibly find a middle ground and have it not go to waste.



    Badge Robot


                No, I'm not a robot.            


        Yes, you are not the first.    


         I just made a PR template.     



    Badge Info

    If you want to know more about Markdown check out:


                                [Button MarkedDown]MarkedDown



    opened by ElectronicsArchiver 5
  • Can't fetch latest be version, so use 22767 as default instead.

    Can't fetch latest be version, so use 22767 as default instead.

    When I tried using the latest Mindustry client, I got this.

    mindustry {
        client {
            mindustry be latest
        }
    }
    
    Can't fetch latest be version, so use 22767 as default instead.
    java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.github.com/repos/Anuken/MindustryBuilds/releases/latest
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
    	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
    	at java.net.URL.openStream(URL.java:1067)
    	at kotlin.io.TextStreamsKt.readBytes(ReadWrite.kt:150)
    	at io.github.liplum.mindustry.IGameSpec$DefaultImpls.LatestBE(GameSpec.kt:110)
    	at io.github.liplum.mindustry.ServerSpec.LatestBE(GameSpec.kt:184)
    	at io.github.liplum.mindustry.IGameSpec$DefaultImpls.be(GameSpec.kt:70)
    	at io.github.liplum.mindustry.ServerSpec.be(GameSpec.kt:184)
    	at Build_gradle$2.execute(build.gradle.kts:29)
    	at Build_gradle$2.execute(build.gradle.kts:4)
    	at org.gradle.internal.extensibility.ExtensionsStorage$ExtensionHolder.configure(ExtensionsStorage.java:173)
    	at org.gradle.internal.extensibility.ExtensionsStorage.configureExtension(ExtensionsStorage.java:64)
    	at org.gradle.internal.extensibility.DefaultConvention.configure(DefaultConvention.java:194)
    	at io.github.liplum.mindustry.Extension.mindustry(Extensions.kt:23)
    	at Build_gradle.<init>(build.gradle.kts:24)
    
    bug 
    opened by liplum 4
  • Support more resource generators.

    Support more resource generators.

    Shader

    It only needs the field without void load( ) method. Because users may have their own way to initialize those shaders.

    Bundle

    To generate each i18n pair in bundles.

    enhancement 
    opened by liplum 3
  • A module can't apply mgpp in a multi-module project

    A module can't apply mgpp in a multi-module project

    Context

    In its the build.gradle.kts, I added some dependencies from other modules in my while project.

    plugins {
        kotlin("jvm")
        id("com.google.devtools.ksp") version "1.7.0-1.0.6"
        `maven-publish`
        id("io.github.liplum.mgpp")
    }
    ...
    dependencies {
        implementation(project(":annotations"))
        implementation(project(":lib"))
        testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
        testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
    }
    

    Problem

    When I sync the gradle in my Intellij IDEA, the problem was ocurred.

    Build file 'E:\MyProject\Mindustry\CyberIO\lib\build.gradle.kts' line: 2
    
    An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.jvm', version: '1.6.21']
    > Failed to apply plugin 'org.jetbrains.kotlin.jvm'.
       > Gradle#projectsEvaluated(Action) on build 'cyberio' cannot be executed in the current context.
    
    * Exception is:
    org.gradle.api.plugins.InvalidPluginException: An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.jvm', version: '1.6.21']
    ...
    at io.github.liplum.mindustry.MindustryJavaPlugin$apply$1$2$1.invoke(Plugins.kt:453)
    	at io.github.liplum.mindustry.MindustryJavaPlugin$apply$1$2$1.invoke(Plugins.kt:275)
    	at io.github.liplum.dsl.KtDslSupportKt$sam$i$org_gradle_api_Action$0.execute(KtDslSupport.kt)
    	at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:44)
    	at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:44)
    	at org.gradle.api.internal.DefaultNamedDomainObjectCollection$ExistingNamedDomainObjectProvider.configure(DefaultNamedDomainObjectCollection.java:853)
    	at org.gradle.api.internal.tasks.DefaultTaskCollection$ExistingTaskProvider.configure(DefaultTaskCollection.java:200)
    	at org.gradle.api.internal.DefaultNamedDomainObjectCollection.named(DefaultNamedDomainObjectCollection.java:391)
    	at org.gradle.api.internal.tasks.DefaultTaskCollection.named(DefaultTaskCollection.java:127)
    	at io.github.liplum.mindustry.MindustryJavaPlugin$apply$1$2.invoke(Plugins.kt:452)
    	at io.github.liplum.mindustry.MindustryJavaPlugin$apply$1$2.invoke(Plugins.kt:273)
    	at io.github.liplum.dsl.DslExtensionsKt.afterEvaluateThis$lambda-1(DslExtensions.kt:99)
    	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:123)
    
    Caused by: org.gradle.api.internal.AbstractMutationGuard$IllegalMutationException: Gradle#projectsEvaluated(Action) on build 'cyberio' cannot be executed in the current context.
    	at org.gradle.api.internal.AbstractMutationGuard.createIllegalStateException(AbstractMutationGuard.java:39)
    	at org.gradle.api.internal.AbstractMutationGuard.assertMutationAllowed(AbstractMutationGuard.java:34)
    	at org.gradle.invocation.DefaultGradle.assertProjectMutatingMethodAllow
    

    My research

    When I comment, aka remove, all implementation dependencies of other modules, such as implementation(project(":annotations")), it's solved. But it's unacceptable, I need them.

    bug 
    opened by liplum 2
  • [Feature Request] Json/JavaScript Mod `auto work with--fromTask`

    [Feature Request] Json/JavaScript Mod `auto work with--fromTask`

    Use cases

    1. In a multi-project mod, users want to test something on Json/JavaScript mod. However, when they run :runClient task, the Json/JavaScript mod isn't involving the mod work with--fromTask automatically as what jar does, that is, users have to add something like:
      add fromTask ":project:zip"
      
    2. If users are willing to use gradle and mgpp to develop Json/JavaScript mod, it's useful to start the game on their workspace in no time.
    enhancement 
    opened by liplum 2
  • Generate a Meta class from mod.[h]json.

    Generate a Meta class from mod.[h]json.

    Sometimes, users would forget their mod name or would like to reference the content in mod.json. So I think the additional function could be useful for them.

    enhancement 
    opened by liplum 2
  • [Feature Request] Customize the dex --min-api

    [Feature Request] Customize the dex --min-api

    The default --min-api is 14, although Mindustry can run on Android 4.0.1 which is the minimum. But in some rare cases, we need the """new""" features from higher version.

    enhancement 
    opened by liplum 1
  • Build a documentation page

    Build a documentation page

    As the more and more features are introduced in mgpp, the guideline is essential for users.

    What we need

    1. A dynamic documentation page for switchable DSL.
    2. Detailed descriptive document for each task and configuration.
    documentation 
    opened by liplum 1
  • Debug both client and server simultaneously

    Debug both client and server simultaneously

    I want to test whether my mod could work on server side, but I can't start multiple debugging session, one for client, one for server. As a workaround, I debug the server in intellij IDEA but start the game outside. Is any way to debug both at the same time?

    enhancement 
    opened by liplum 1
  • [v1.1.6] `deploy` cannot find renamed `jar` output

    [v1.1.6] `deploy` cannot find renamed `jar` output

    In my build.gradle:

    tasks.jar {
        archiveBaseName.set("CyberIO")
    }
    
    * What went wrong:
    Execution failed for task ':main:deploy'.
    > Cannot expand ZIP '/home/runner/work/CyberIO/CyberIO/main/build/libs/main-4.0.jar' as it does not exist.
    
    bug 
    opened by liplum 0
  • [v1.1.4] `version: 4` in mod.hjson doesn't work

    [v1.1.4] `version: 4` in mod.hjson doesn't work

    In addition, version doesn't work with every number, including float and integer, but is fine with a string.

    // Doesn't work
    version: 4
    
    // Can work
    version : "4"
    
    bug 
    opened by liplum 0
  • [v1.1.7] Change mod version will cause duplicate mods

    [v1.1.7] Change mod version will cause duplicate mods

    When I upgrade my mod, the game will be started up with duplicate mods, for example: When I change the version from v1.0 to v1.1 in mod.hjson, The mods will contains both my-mod-v1.0.jar and my-mod-v1.1.jar

    bug 
    opened by liplum 0
  • [Feature Request] Multiple-slot `runClient`

    [Feature Request] Multiple-slot `runClient`

    When I always test on two clients, one for the official and one for the Foo's client, but I have to edit my build.gradle to switch version instead of two tasks. So make a multiple-slot runClient would be nice, such as runClientA, runClientB...

    enhancement 
    opened by liplum 0
  • [Feature Request] Support workflow `jar->copy->start game->runServer->debug`

    [Feature Request] Support workflow `jar->copy->start game->runServer->debug`

    Please support this workflow:

    1. run jar task
    2. copy what jar task outputted to my default data directory
    3. start the game externally
    4. run runServer task
    5. join a local game
    6. debug server

    This is a simple workaround for #8

    enhancement 
    opened by liplum 0
  • [Feature Request] Make all modules download game once if they have the same version

    [Feature Request] Make all modules download game once if they have the same version

    My Issues When I set the game location only in the root project, the game would be downloaded several times, however, they have the same version, which is a definitely waste of network data.

    My solutions/needs So I want them to be downloaded once if they have the same version, in other words, the game can be shared among all modules.

    enhancement 
    opened by liplum 0
  • [Feature Request] Support Foo's Client

    [Feature Request] Support Foo's Client

    Please support Foo's Client. Kinda like this, in build.gradle.kts

    mindustry {
        client {
            mindustry foo "v8" // or latest notation
            // or
            mindustry fooV7 "1105" // or latest notation
        }
    }
    
    enhancement 
    opened by liplum 3
Owner
Plumy Games
A self-team to develop games and mods.
Plumy Games
Android Studio plugin which automatically generates drawable selectors from appropriately named resources.

SelectorChapek for Android This Android Studio plugin automatically generates drawable selectors from appropriately named Android resources. How to in

Inmite s.r.o. 1.6k Dec 29, 2022
Gradle Replace In Place (GRIP): a gradle plugin to update your documentation or any file with a simple gradle task

GRIP (Gradle Replace In-Place) A gradle tool to update some values in your (documentation) files by running a task. (inspired by Knit) Directives Inse

Grégory Lureau 2 Oct 18, 2022
gradle-android-scala-plugin adds scala language support to official gradle android plugin

gradle-android-scala-plugin gradle-android-scala-plugin adds scala language support to official gradle android plugin. See also sample projects at htt

saturday06 345 Dec 10, 2022
Ownership-gradle-plugin - Gradle code ownership verification plugin

Gradle code ownership verification plugin A gradle plugin that will verify owner

null 4 Dec 15, 2022
Helper to upload Gradle Android Artifacts, Gradle Java Artifacts and Gradle Kotlin Artifacts to Maven repositories (JCenter, Maven Central, Corporate staging/snapshot servers and local Maven repositories).

GradleMavenPush Helper to upload Gradle Android Artifacts, Gradle Java Artifacts and Gradle Kotlin Artifacts to Maven repositories (JCenter, Maven Cen

 Vorlonsoft LLC 21 Oct 3, 2022
GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.

Gradle Play Publisher Gradle Play Publisher is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and

null 3.9k Dec 30, 2022
A Gradle plugin to report the number of method references in your APK on every build.

Dexcount Gradle Plugin A Gradle plugin to report the number of method references in your APK, AAR, or java module. This helps you keep tabs on the gro

Keepsafe 3k Dec 29, 2022
Gradle plugin which downloads and manages your Android SDK.

DEPRECATED This plugin is deprecated and is no longer being developed. Tools and dependencies are automatically downloaded using version 2.2.0 of the

Jake Wharton 1.4k Dec 29, 2022
A Gradle plugin to support the Groovy language for building Android apps

Groovy language support for Android Deprecated: This plugin has been deprecated in favor of Kotlin which has the full support of JetBrains and Google.

Groovy programming language 853 Dec 21, 2022
Add a different ribbon to each of your Android app variants using this gradle plugin. Of course, configure it as you will

Easylauncher gradle plugin for Android Modify the launcher icon of each of your app-variants using simple gradle rules. Add ribbons of any color, over

Mikel 960 Dec 18, 2022
A Gradle Plugin that removes unused resources in Android projects.

#Lint Cleaner Plugin Removes unused resources reported by Android lint including strings, colors and dimensions. Depracated As of Android Studio 2.0+

Marco RS 705 Nov 25, 2022
Gradle plugin for Google Protocol Buffers

Gradle Protobuf Plugin Author: Andrew Kroh Download: See maven central License: Apache License, Version 2.0 Requirements: Java 1.5+ Google Protocol Bu

Andrew Kroh 36 May 29, 2022
Gradle plugin which validates the licenses of your dependency graph match what you expect

Licensee ?? ?? A Gradle plugin which validates the licenses of your dependency graph match what you expect, or it fails your build! Jump to: Introduct

Cash App 506 Jan 8, 2023
IntelliJ plugin that provides some useful utilities to support the daily work with Gradle.

IntelliJ Gradle Utilities Plugin This IntelliJ plugin provides some useful utilities to support the daily work with Gradle. It's available on the offi

Marcel Kliemannel 6 Jul 29, 2022
Gradle plugin which helps you analyze the size of your Android apps.

Ruler Ruler is a Gradle plugin which helps you analyze the size of your Android apps. Motivation App size is an important metric which directly correl

Spotify 913 Dec 28, 2022
A Gradle plugin for providing your secrets to your Android project.

Secrets Gradle Plugin for Android A Gradle plugin for providing your secrets securely to your Android project. This Gradle plugin reads secrets from a

Google 560 Jan 8, 2023
Gradle plugin to use git tags as project version names

Version Name Gradle Plugin This plugin adds a kotlin extension function that provides a version name based on the latest git tag. How to use it ?? App

Doist 3 Mar 9, 2022
CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native.

C Klib CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native. The Problem When you want to access C-etc code f

Touchlab 73 Nov 8, 2022