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

Publish version 7.1.0 to gradle plugin repository #150

Closed
LanShunoda opened this issue Nov 8, 2023 · 4 comments
Closed

Publish version 7.1.0 to gradle plugin repository #150

LanShunoda opened this issue Nov 8, 2023 · 4 comments
Labels
enhancement Feature Improvements

Comments

@LanShunoda
Copy link

I see that the latest version of newrelic android agent is 7.1.0 but gradle plugin repository contains only 7.0.0.
Please publish latest version of newrelic android agent to gradle plugin repository(https://plugins.gradle.org/plugin/com.newrelic.agent.android).
image
image

@LanShunoda LanShunoda added the bug Something isn't working label Nov 8, 2023
@ywang-nr ywang-nr added documentation Improvements or additions to documentation and removed bug Something isn't working labels Nov 8, 2023
@ndesai-newrelic
Copy link
Contributor

@LanShunoda The New Relic plugin on the Gradle Plugin Portal is still in the Proof of Concept stage and is not fully functional. We need to make some changes on our end to make it work from the Gradle Plugin Portal. Currently, using the plugin from the Gradle Plugin Portal is not working as expected. Therefore, we recommend using the classpath method to integrate the New Relic plugin.

@ndesai-newrelic ndesai-newrelic added enhancement Feature Improvements and removed documentation Improvements or additions to documentation labels Nov 8, 2023
@cthomas-newrelic
Copy link
Contributor

@LanShunoda A suggested workaround to use the plugins closure:

The Android agent plugin is not yet published to the Gradle Plugin Portal (we plan on doing this later this year), so until this is done you will have to provide the classpath to the plugin either through the buildscript DSL (as documented), or in settings.gradle(.kts) through the pluginManagement closure:

pluginManagement {
  var nr_version = "7.1.+"

  repositories {
    mavenCentral()
  }
  resolutionStrategy {
    eachPlugin {
      if (requested.id.id.startsWith("newrelic")) {
        useModule("com.newrelic.agent.android:agent-gradle-plugin:${nr_version}")
      }
    }
  }

  // optiional: define here or root level build
  plugins {
    id("newrelic") version "${nr_version}"
  }
}

Then, the New Relic plugin can be declared in either pluginManagement (above), or the project level gradle build file:

pluginManagement {
  var nr_version = "7.+"

  repositories {
    mavenCentral()
  }
  resolutionStrategy {
    eachPlugin {
      if (requested.id.id.startsWith("newrelic")) {
        useModule("com.newrelic.agent.android:agent-gradle-plugin:${nr_version}")
      }
    }
  }

  // optiional: define here or root level build
  plugins {
    id("newrelic") version "${nr_version}"
  }
}

plugins {
  id("com.android.application") version "8.1.+ apply false
  id("org.jetbrains.kotlin.android") version "1.8.0" apply false
  id("newrelic") version "<version>" apply false
}

And then applied in the app-level build file with:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("newrelic")
}

@rcosteira79
Copy link

Hi there! Is there any development on this?

@ywang-nr
Copy link
Contributor

We have updated the gradle plugin with the latest release, you can find more details here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature Improvements
Projects
None yet
Development

No branches or pull requests

5 participants