All Projects → plnice → Can I Drop Jetifier

plnice / Can I Drop Jetifier

Licence: apache-2.0
Gradle plugin that checks if there are dependencies using support library instead of AndroidX.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Can I Drop Jetifier

Booster
🚀Optimizer for mobile applications
Stars: ✭ 3,741 (+619.42%)
Mutual labels:  gradle-plugin
Axion Release Plugin
Gradle release & version management plugin.
Stars: ✭ 372 (-28.46%)
Mutual labels:  gradle-plugin
Bnd
Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
Stars: ✭ 446 (-14.23%)
Mutual labels:  gradle-plugin
Gradle Play Publisher
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.
Stars: ✭ 3,690 (+609.62%)
Mutual labels:  gradle-plugin
Detekt
Static code analysis for Kotlin
Stars: ✭ 4,169 (+701.73%)
Mutual labels:  gradle-plugin
Androidautotrack
Android Asm 插桩 教学
Stars: ✭ 378 (-27.31%)
Mutual labels:  gradle-plugin
Gradle Android Junit Jacoco Plugin
Gradle plugin that generates JaCoCo reports from an Android Gradle Project
Stars: ✭ 315 (-39.42%)
Mutual labels:  gradle-plugin
Laziertracker
本项目通过Android字节码插桩插件实现Android端无埋点(或自动埋点),并且支持根据配置文件实现业务数据的自动采集。
Stars: ✭ 485 (-6.73%)
Mutual labels:  gradle-plugin
Calces Gradle Plugin
Android构建工具集:包含快速实现组件化构建脚本,快速实现屏幕最小宽度适配脚本
Stars: ✭ 366 (-29.62%)
Mutual labels:  gradle-plugin
Javafx Gradle Plugin
Gradle plugin for JavaFX
Stars: ✭ 425 (-18.27%)
Mutual labels:  gradle-plugin
Gradle Android Command Plugin
Handy commands for testing Android on CI
Stars: ✭ 349 (-32.88%)
Mutual labels:  gradle-plugin
Gradle Errorprone Plugin V0.0.x
Gradle plugin to use the error-prone compiler for Java
Stars: ✭ 351 (-32.5%)
Mutual labels:  gradle-plugin
Gradle Static Analysis Plugin
Easy setup of static analysis tools for Android and Java projects.
Stars: ✭ 398 (-23.46%)
Mutual labels:  gradle-plugin
Swagger Gradle Codegen
💫 A Gradle Plugin to generate your networking code from Swagger
Stars: ✭ 330 (-36.54%)
Mutual labels:  gradle-plugin
Gradle Test Logger Plugin
A Gradle plugin for printing beautiful logs on the console while running tests
Stars: ✭ 460 (-11.54%)
Mutual labels:  gradle-plugin
Android Gradle Aspectj
gradle plug-in adding supports of AspectJ into Android project
Stars: ✭ 323 (-37.88%)
Mutual labels:  gradle-plugin
Gradle Js Plugin
Gradle plugin for working with JS
Stars: ✭ 376 (-27.69%)
Mutual labels:  gradle-plugin
Gradle Tomcat Plugin
Gradle plugin supporting deployment of your web application to an embedded Tomcat web container
Stars: ✭ 516 (-0.77%)
Mutual labels:  gradle-plugin
Gradle Download Task
Adds a download task to Gradle that displays progress information
Stars: ✭ 478 (-8.08%)
Mutual labels:  gradle-plugin
Dependency Analysis Android Gradle Plugin
Gradle plugin for Java, Kotlin, and Android projects. Provides advice for managing dependencies and other applied plugins
Stars: ✭ 409 (-21.35%)
Mutual labels:  gradle-plugin

Can I drop Jetifier?

Checks whether there are any dependencies using support library instead of AndroidX artifacts.

If you migrated to AndroidX, you probably have the Jetifier tool enabled that converts dependencies that still depend on old artifacts to operate on AndroidX classes. Since more and more libraries are migrated to AndroidX, at some point there will be no need to have this tool enabled. This plugin can be used to identify which of the libraries you are using need to be migrated to AndroidX or bumped if the new version is already there.

Setup

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

plugins {
  id "com.github.plnice.canidropjetifier" version "0.5"
}

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

buildscript {
  repositories {
    gradlePluginPortal()
  }
  dependencies {
    classpath "com.github.plnice:canidropjetifier:0.5"
  }
}

apply plugin: "com.github.plnice.canidropjetifier"

For multi-module projects, you can apply the plugin in the top-level build.gradle file. It will analyze all the modules found in the project.

Usage

The Jetifier tool must be temporarily disabled to make this plugin work correctly. It can be done when calling the plugin's task:

./gradlew -Pandroid.enableJetifier=false canIDropJetifier

Example output:

========================================
Project sample
========================================

Cannot drop Jetifier due to following module dependencies:

* sample-dependency (module)
  \-- com.android.support:cardview-v7:28.0.0
  \-- com.squareup.leakcanary:leakcanary-android:1.6.3
   \-- com.android.support:support-core-utils:26.0.0
  \-- com.squareup.leakcanary:leakcanary-android:1.6.3
   \-- com.squareup.leakcanary:leakcanary-analyzer:1.6.3
    \-- com.android.support:support-annotations:28.0.0

Cannot drop Jetifier due to following external dependencies:

* com.android.support:cardview-v7:28.0.0

* com.squareup.leakcanary:leakcanary-android:1.6.3
  \-- com.squareup.leakcanary:leakcanary-analyzer:1.6.3
   \-- com.android.support:support-annotations:28.0.0
  \-- com.android.support:support-core-utils:26.0.0

Configuration

canIDropJetifier {
  verbose = true // Default: false, set to true to print the dependencies tree down to the old artifact
  includeModules = false // Default: true, print out not only external (library) dependencies, but also module dependencies that use old artifacts
  analyzeOnlyAndroidModules = false // Default: true, analyze only modules that use com.android.application or com.android.library plugins
  configurationRegex = ".*RuntimeClasspath" // Performance optimization: checks only configurations that match provided regex
  parallelMode = true // Default: false, experimental: run analysis of modules in parallel
  parallelModePoolSize = 4 // Default: max available processors - 1, experimental: pool size for analysis in parallel
}

License

Copyright 2019 Miłosz Lewandowski

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].