Coder Social home page Coder Social logo

hellofresh / deblibs-gradle-plugin Goto Github PK

View Code? Open in Web Editor NEW
71.0 209.0 5.0 708 KB

A Gradle plugin that creates Github issue and Slack message for outdated dependencies so they can easily be tracked and manually upgraded.

License: Apache License 2.0

Kotlin 100.00%
gradle dependencies upgrade android maven gradlew versions gradle-version kotlin java

deblibs-gradle-plugin's Introduction

Build Status Gradle Plugin Portal

Deprecated

The plugin support has stopped. There will be no new updates, but latest published version will be available as a dependency. Please consider migrating to https://github.com/ben-manes/gradle-versions-plugin

DebLibs

A Gradle plugin that creates Github issue and Slack message for outdated project dependencies so they can easily be tracked and manually upgraded.

This plugin builds on the Gradle Versions Plugin.

Screenshots

Sample Github Issue

Alt text

Sample Slack Issue

Alt text

Usage

plugins block:

Build script snippet for plugins DSL for Gradle 2.1 and later:

plugins {
  id "com.hellofresh.gradle.deblibs" version "$version"
}

Build script snippet for use in older Gradle versions or where dynamic configuration is required:

buildscript block:

apply plugin: "com.hellofresh.gradle.deblibs"

buildscript {

  repositories {
    maven { url "https://plugins.gradle.org/m2/"}
  }

  dependencies {
    classpath "com.hellofresh.gradle:deblibs:$version"
  }

}

The plugin show work with Gradle version 4.9 and above.

Configuration

The following configuration block is required.

If you don't configure the default will be used which are blank values. This will lead to undesirable behaviour which means info about outdated dependencies won't be uploaded.

deblibs {
   projectName ="Project name"
   githubRepo = "project-github-repo"
   githubToken = "github-token"
   slackToken = "slack-token"
   slackChannel = "#slack-channel"
   slackIconUrl = "url-to-an-icon-to-be-used-by-the-slack-bot"
   gitlabToken = "gitlab-personal-access-token"
   gitlabProjectId = "gitlab-project-id"    
}

Tasks

The plugin comes with two tasks. A task for publishing info about outdated dependencies to Github as an issue. This is useful when you want to track outdated dependencies as an issue on Github.

The second task is for publishing info about outdated dependencies to a Slack channel as a message. This is also useful when you want to post outdated dependencies to slack.

To create a Github issue, issue the command:

./gradlew createGithubIssue

To post to Slack, issue the command:

./gradlew createSlackMessage

To create a Gitlab issue, issue the command:

./gradlew createGitlabIssue

Development

Import

Import the settings.gradle.kts file into your IDE for development. Works well with IntelliJ Community edition or IntelliJ Ultimate compared to say Android studio.

Build

Build the plugin with: ./gradlew build

Publish to a local maven repository for testing with: ./gradlew publishToMavenLocal

Test

Change into the sample-deblibs project and issue any of the plugin tasks that you want to test.

Link

Deblibs Gradle Plugin on the Gradle Plugin Registry

License

Copyright (C) 2018 The DebLibs Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

deblibs-gradle-plugin's People

Contributors

eyedol avatar hf-security avatar kingsleyadio avatar mend-for-github-com[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deblibs-gradle-plugin's Issues

Upgrade to Gradle 6

Hello,

It'd be nice to have the plugin updated so that it's compatible with Gradle 6 and can be used in newer projects :)

Update docs to require Gradle 4.9

Expected behavior

Expect this to work with Gradle 4.3

Actual behavior

Creating deblibs tasks...


FAILURE: Build failed with an exception.

* What went wrong:
org.gradle.api.tasks.TaskContainer.register(Ljava/lang/String;Ljava/lang/Class;Lorg/gradle/api/Action;)Lorg/gradle/api/tasks/TaskProvider;

Steps to reproduce the behavior

  • Install gradle 4.3
  • run ./gradlew --stacktrace --info createSlackMessage

From the gradle docs, it looks like this endpoint was added in 4.9:
https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/TaskContainer.html#register-java.lang.String-org.gradle.api.Action-

Proofread readme

Read through the README.md file to remove any typos or confusions or grammatical errors.

Does not work with Kotlin 1.5

Expected behavior

After update ั‚ะพ Android 1.5

Actual behavior

After update to 1.5 it doest work

Steps to reproduce the behavior

Update you project's Kotlin version to 1.5 or higher

Add task that publishes report to slack

Add a task that reads createSlackMessage that when invoked will send this sample message.

Title (number_of_outdated_debs)

  • outdated dependency 1
  • outdated dependency 2
  • outdated dependency 3

Add Sample Project that consume the plugin

This is as a way to manually test changes the plugin itself

  • Include a sample project that consumes.
  • Update README to include how to use this sample project for testing.

Don't attempt to upload report when there's no outdated dependencies

Expected behavior

  • When there are no outdated dependencies, don't attempt to make a network request to post the report. Instead, show an info logged message that there's nothing to be uploaded.

Actual behavior

  • Right now the plugin does the network request even when there are no outdated dependencies.

Outdated Dependencies(3)

  • io.kotlintest:kotlintest-runner-junit5:[3.1.9 -> 3.4.2] -> io.kotlintest
  • org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:[1.3.41 -> 1.3.61]
  • org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:[1.3.41 -> 1.3.61] -> org.jetbrains.kotlin

Gradle updates:

  • Gradle: [5.0 -> 6.1.1]

Merge github owner and repo into one property

Expected behavior

Should use a single property called github_repo that requires both the owner and repo name

Actual behavior

Currently, separate properties are required for Github owner and repo name

Prepare for v1.0.0 release

Add command for releasing via Travis CI. Add these

script:
  - ./gradlew build --no-daemon
  - if [ -n "$TRAVIS_TAG" ]; then ./gradlew build publishPlugins --no-daemon; fi
env:
  global:
  # GRADLE_PUBLISH_KEY
  - secure: <secure gradle publish key>
  # GRADLE_PUBLISH_SECRET
  - secure: <secure gradle screte key>

Setup credentials for publishing to Gradle plugin registry

Add Changelog file

Add test

Add necessary unit test and automate builds via Travis CI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.