<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AppDynamics Gradle Plugin (Android) does not support Maven repositories with non-password credentials in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/AppDynamics-Gradle-Plugin-Android-does-not-support-Maven/m-p/720200#M1897</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Project/environment setup:&lt;BR /&gt;1. Android Gradle Plugin: 8.1.1&lt;BR /&gt;2. AppDynamics Android agent: 23.7.1&lt;BR /&gt;3. Gradle version: 8.3&lt;BR /&gt;3. Java 17&lt;/P&gt;&lt;P&gt;In our company we need to migrate to new Maven repository (GitLab) and need to use header credentials for this new maven repo. Exactly as described in GitLab docs here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.gitlab.com/ee/user/packages/maven_repository/?tab=gradle#edit-the-client-configuration" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.gitlab.com/ee/user/packages/maven_repository/?tab=gradle#edit-the-client-configuration&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So, basically our Maven repository configuration looks approximately like this:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;maven &lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;url &lt;/SPAN&gt;= uri(&lt;SPAN&gt;"https://repo.url"&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;name &lt;/SPAN&gt;= &lt;SPAN&gt;"GitLab"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;credentials&lt;/SPAN&gt;(HttpHeaderCredentials::&lt;SPAN&gt;class&lt;/SPAN&gt;) &lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;name &lt;/SPAN&gt;= &lt;SPAN&gt;"TokenHeader"&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;value &lt;/SPAN&gt;= "TokenValue"&lt;BR /&gt;    &lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;    authentication &lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;create&lt;/SPAN&gt;(&lt;SPAN&gt;"header"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;HttpHeaderAuthentication::&lt;SPAN&gt;class&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The problem that once we add this to project configuration, the project starts failing on Gradle configuration stage with below stacktrace:&lt;/P&gt;&lt;PRE&gt;FAILURE: Build failed with an exception.&lt;BR /&gt;&lt;BR /&gt;* What went wrong:&lt;BR /&gt;A problem occurred configuring project ':app'.&lt;BR /&gt;&amp;gt; Can not use getCredentials() method when not using PasswordCredentials; please use getCredentials(Class)&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;* Exception is:&lt;BR /&gt;org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.&lt;BR /&gt;...&lt;BR /&gt;Caused by: java.lang.IllegalStateException: Can not use getCredentials() method when not using PasswordCredentials; please use getCredentials(Class)&lt;BR /&gt;at org.gradle.api.internal.artifacts.repositories.AuthenticationSupporter.getCredentials(AuthenticationSupporter.java:62)&lt;BR /&gt;...&lt;BR /&gt;at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:60)&lt;BR /&gt;at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository_Decorated.getProperty(Unknown Source)&lt;BR /&gt;at com.appdynamics.android.gradle.DependencyInjector$1$_afterEvaluate_closure2$_closure6.doCall(DependencyInjector.groovy:93)&lt;BR /&gt;at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;...&lt;BR /&gt;at org.gradle.api.internal.artifacts.DefaultArtifactRepositoryContainer.addRepository(DefaultArtifactRepositoryContainer.java:88)&lt;BR /&gt;at org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.maven(DefaultRepositoryHandler.java:161)&lt;BR /&gt;at org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.maven(DefaultRepositoryHandler.java:167)&lt;BR /&gt;at org.gradle.api.artifacts.dsl.RepositoryHandler$maven.call(Unknown Source)&lt;BR /&gt;at com.appdynamics.android.gradle.DependencyInjector$1$_afterEvaluate_closure2.doCall(DependencyInjector.groovy:89)&lt;BR /&gt;at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)&lt;BR /&gt;at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at com.appdynamics.android.gradle.DependencyInjector$1.afterEvaluate(DependencyInjector.groovy:79)&lt;BR /&gt;at jdk.internal.reflect.GeneratedMethodAccessor2628.invoke(Unknown Source)&lt;BR /&gt;at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingInvocationHandler$1.lambda$run$0(DefaultListenerBuildOperationDecorator.java:255)&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;From what I understood AppDynamics plugin is trying to use somehow maven repositories mentioned in the project and trying to work with them via some reflection API. And only assume that Maven repositories can have authentication via username/password.&lt;/P&gt;&lt;P&gt;I also found that it is somehow related to `adeum.dependencyInjection.enabled` property, but it is poorly documented. Well, I have not found any documentation about what it is doing at all, only single sentence mentioning it here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.appdynamics.com/appd/22.x/22.3/en/end-user-monitoring/mobile-real-user-monitoring/instrument-android-applications/troubleshoot-the-android-instrumentation#id-.TroubleshoottheAndroidInstrumentationv22.1-EnforceaDifferentRuntimeVersionfromthePluginVersion" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.appdynamics.com/appd/22.x/22.3/en/end-user-monitoring/mobile-real-user-monitoring/instrument-android-applications/troubleshoot-the-android-instrumentation#id-.TroubleshoottheAndroidInstrumentationv22.1-EnforceaDifferentRuntimeVersionfromthePluginVersion&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Anyway, after trying disabling this option, the project compiles, but app crashes in runtime when built.&lt;/P&gt;&lt;P&gt;So, questions are:&lt;/P&gt;&lt;P&gt;1. Is there any way to use Maven repository with non username/password option and AppDynamics plugin?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; We are not allowed to use different authentication for it, so AppDynamics plugin becoming a blocker for us for building the project.&lt;/P&gt;&lt;P&gt;2. Is there any documentation or knowledge about&amp;nbsp;`adeum.dependencyInjection.enabled`, because it seems it is directly related to the issue?&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 07 Sep 2023 14:21:25 GMT</pubDate>
    <dc:creator>Nick_Silin</dc:creator>
    <dc:date>2023-09-07T14:21:25Z</dc:date>
    <item>
      <title>AppDynamics Gradle Plugin (Android) does not support Maven repositories with non-password credentials</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/AppDynamics-Gradle-Plugin-Android-does-not-support-Maven/m-p/720200#M1897</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Project/environment setup:&lt;BR /&gt;1. Android Gradle Plugin: 8.1.1&lt;BR /&gt;2. AppDynamics Android agent: 23.7.1&lt;BR /&gt;3. Gradle version: 8.3&lt;BR /&gt;3. Java 17&lt;/P&gt;&lt;P&gt;In our company we need to migrate to new Maven repository (GitLab) and need to use header credentials for this new maven repo. Exactly as described in GitLab docs here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.gitlab.com/ee/user/packages/maven_repository/?tab=gradle#edit-the-client-configuration" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.gitlab.com/ee/user/packages/maven_repository/?tab=gradle#edit-the-client-configuration&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So, basically our Maven repository configuration looks approximately like this:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;maven &lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;url &lt;/SPAN&gt;= uri(&lt;SPAN&gt;"https://repo.url"&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;name &lt;/SPAN&gt;= &lt;SPAN&gt;"GitLab"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;credentials&lt;/SPAN&gt;(HttpHeaderCredentials::&lt;SPAN&gt;class&lt;/SPAN&gt;) &lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;name &lt;/SPAN&gt;= &lt;SPAN&gt;"TokenHeader"&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;value &lt;/SPAN&gt;= "TokenValue"&lt;BR /&gt;    &lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;    authentication &lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;create&lt;/SPAN&gt;(&lt;SPAN&gt;"header"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;HttpHeaderAuthentication::&lt;SPAN&gt;class&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The problem that once we add this to project configuration, the project starts failing on Gradle configuration stage with below stacktrace:&lt;/P&gt;&lt;PRE&gt;FAILURE: Build failed with an exception.&lt;BR /&gt;&lt;BR /&gt;* What went wrong:&lt;BR /&gt;A problem occurred configuring project ':app'.&lt;BR /&gt;&amp;gt; Can not use getCredentials() method when not using PasswordCredentials; please use getCredentials(Class)&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;* Exception is:&lt;BR /&gt;org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.&lt;BR /&gt;...&lt;BR /&gt;Caused by: java.lang.IllegalStateException: Can not use getCredentials() method when not using PasswordCredentials; please use getCredentials(Class)&lt;BR /&gt;at org.gradle.api.internal.artifacts.repositories.AuthenticationSupporter.getCredentials(AuthenticationSupporter.java:62)&lt;BR /&gt;...&lt;BR /&gt;at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:60)&lt;BR /&gt;at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository_Decorated.getProperty(Unknown Source)&lt;BR /&gt;at com.appdynamics.android.gradle.DependencyInjector$1$_afterEvaluate_closure2$_closure6.doCall(DependencyInjector.groovy:93)&lt;BR /&gt;at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;...&lt;BR /&gt;at org.gradle.api.internal.artifacts.DefaultArtifactRepositoryContainer.addRepository(DefaultArtifactRepositoryContainer.java:88)&lt;BR /&gt;at org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.maven(DefaultRepositoryHandler.java:161)&lt;BR /&gt;at org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.maven(DefaultRepositoryHandler.java:167)&lt;BR /&gt;at org.gradle.api.artifacts.dsl.RepositoryHandler$maven.call(Unknown Source)&lt;BR /&gt;at com.appdynamics.android.gradle.DependencyInjector$1$_afterEvaluate_closure2.doCall(DependencyInjector.groovy:89)&lt;BR /&gt;at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)&lt;BR /&gt;at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at com.appdynamics.android.gradle.DependencyInjector$1.afterEvaluate(DependencyInjector.groovy:79)&lt;BR /&gt;at jdk.internal.reflect.GeneratedMethodAccessor2628.invoke(Unknown Source)&lt;BR /&gt;at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingInvocationHandler$1.lambda$run$0(DefaultListenerBuildOperationDecorator.java:255)&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;From what I understood AppDynamics plugin is trying to use somehow maven repositories mentioned in the project and trying to work with them via some reflection API. And only assume that Maven repositories can have authentication via username/password.&lt;/P&gt;&lt;P&gt;I also found that it is somehow related to `adeum.dependencyInjection.enabled` property, but it is poorly documented. Well, I have not found any documentation about what it is doing at all, only single sentence mentioning it here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.appdynamics.com/appd/22.x/22.3/en/end-user-monitoring/mobile-real-user-monitoring/instrument-android-applications/troubleshoot-the-android-instrumentation#id-.TroubleshoottheAndroidInstrumentationv22.1-EnforceaDifferentRuntimeVersionfromthePluginVersion" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.appdynamics.com/appd/22.x/22.3/en/end-user-monitoring/mobile-real-user-monitoring/instrument-android-applications/troubleshoot-the-android-instrumentation#id-.TroubleshoottheAndroidInstrumentationv22.1-EnforceaDifferentRuntimeVersionfromthePluginVersion&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Anyway, after trying disabling this option, the project compiles, but app crashes in runtime when built.&lt;/P&gt;&lt;P&gt;So, questions are:&lt;/P&gt;&lt;P&gt;1. Is there any way to use Maven repository with non username/password option and AppDynamics plugin?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; We are not allowed to use different authentication for it, so AppDynamics plugin becoming a blocker for us for building the project.&lt;/P&gt;&lt;P&gt;2. Is there any documentation or knowledge about&amp;nbsp;`adeum.dependencyInjection.enabled`, because it seems it is directly related to the issue?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Sep 2023 14:21:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/AppDynamics-Gradle-Plugin-Android-does-not-support-Maven/m-p/720200#M1897</guid>
      <dc:creator>Nick_Silin</dc:creator>
      <dc:date>2023-09-07T14:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: AppDynamics Gradle Plugin (Android) does not support Maven repositories with non-password credentials</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/AppDynamics-Gradle-Plugin-Android-does-not-support-Maven/m-p/720201#M1898</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/145231"&gt;@Nick.Silin&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Since you created a Support ticket, can you share the learnings/outcome as a reply here please.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 17:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/AppDynamics-Gradle-Plugin-Android-does-not-support-Maven/m-p/720201#M1898</guid>
      <dc:creator>iamryan</dc:creator>
      <dc:date>2023-09-19T17:40:55Z</dc:date>
    </item>
  </channel>
</rss>

