Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Is Gogradle still maintained? #330

Open
jannis-baratheon opened this issue Dec 16, 2021 · 4 comments
Open

Is Gogradle still maintained? #330

jannis-baratheon opened this issue Dec 16, 2021 · 4 comments

Comments

@jannis-baratheon
Copy link

I'm about to start a Go project and, as I'm a big Gradle fan, was wondering if Gogradle could help me with that. Looking at the recent contributions to this project I see that there's not much happening here recently. So my question is: is Gogradle still maintained? Should I use it in my new projects?

@jannis-baratheon
Copy link
Author

CC @blindpirate

@benzvan
Copy link

benzvan commented Jan 27, 2022

I was also starting to look at this project because it has some features I'd really like to use. I wonder if there's a fork that's better maintained.

@jannis-baratheon
Copy link
Author

@benzvan from my investigatiopn there is not. I ended up using bare 'go' command line.

@benzvan
Copy link

benzvan commented Jan 28, 2022

Yea. I'm either going to build my own plugin or keep using make at this point.

ikhoon added a commit to ikhoon/gogradle that referenced this issue Aug 9, 2022
Motivation:

The upstream [Gogradle](https://github.com/gogradle/gogradle) doesn't
seem to be maintained anymore.
- gogradle#328
- gogradle#330

I wanted to migrate a project that builds go cli client to Gradle 7 but
Gogradle was a blocker.
https://github.com/line/centraldogma/blob/b69bb00f199c0009ce58994e21c75208327f66d0/cli/build.gradle#L20
So I decided to fork the upstream code and make the plugin run in
Gradle 7. But I don't know the internal and the full features of
Gogradle. I strongly wish this repo would remain a temporary solution
until the maintainer of the upstream comes back.

Modifications:

- Update dpendencies to th latest one
  - Gradle version is upgraded to 7.5
- Fix `GogradleModule` to inject a `Project` instance correctly.
  - Guice tried to bind 'project' to `DefaultProject.class` which causes
    the following error.
    ```
    1) [Guice/InjectAbstractMethod]: Injected method DefaultProject.getBuildscript() cannot be abstract.
    ```
- Implement new method introduced in Gradle 7 in `GoTestResultsProvider`
- Shade all depedencies apart from Guice.
  ```xml
  // pom.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <!-- This module was also published with a richer model, Gradle metadata,  -->
    <!-- which should be used instead. Do not delete the following line which  -->
    <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
    <!-- that they should prefer consuming it instead. -->
    <!-- do_not_remove: published-with-gradle-metadata -->
    <modelVersion>4.0.0</modelVersion>
    <groupId>kr.ikhoon</groupId>
    <artifactId>gogradle</artifactId>
    <version>0.12.0-RC1</version>
    <dependencies>
      <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>5.1.0</version>
        <scope>runtime</scope>
      </dependency>
    </dependencies>
  </project>
  ```

Result:

Gogradle now runs with Gradle 7.
```groovy
plugins {
  id 'kr.ikhoon.gogradle' version '0.12.0-RC1'
}
```

Side note:

The new plugin uploaded to Gradle portal has not been approved yet.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants