{"action":"opened","issue":{"url":"https://api.github.com/repos/researchgate/gradle-release/issues/125","labels_url":"https://api.github.com/repos/researchgate/gradle-release/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/researchgate/gradle-release/issues/125/comments","events_url":"https://api.github.com/repos/researchgate/gradle-release/issues/125/events","html_url":"https://github.com/researchgate/gradle-release/issues/125","id":101392447,"number":125,"title":"Error: Cannot configure the 'publishing' extension after it has been accessed.","user":{"login":"alibkord","id":2525532,"avatar_url":"https://avatars.githubusercontent.com/u/2525532?v=3","gravatar_id":"","url":"https://api.github.com/users/alibkord","html_url":"https://github.com/alibkord","followers_url":"https://api.github.com/users/alibkord/followers","following_url":"https://api.github.com/users/alibkord/following{/other_user}","gists_url":"https://api.github.com/users/alibkord/gists{/gist_id}","starred_url":"https://api.github.com/users/alibkord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alibkord/subscriptions","organizations_url":"https://api.github.com/users/alibkord/orgs","repos_url":"https://api.github.com/users/alibkord/repos","events_url":"https://api.github.com/users/alibkord/events{/privacy}","received_events_url":"https://api.github.com/users/alibkord/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-17T10:39:50Z","updated_at":"2015-08-17T10:39:50Z","closed_at":null,"body":"build.gradle:\r\n\r\n```\r\nbuildscript {\r\n    repositories {\r\n        jcenter()\r\n        mavenLocal()\r\n    }\r\n\r\n    dependencies {\r\n        classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'\r\n        classpath 'net.researchgate:gradle-release:2.2.0'\r\n    }\r\n}\r\n\r\napply plugin: 'android-sdk-manager'\r\napply plugin: 'com.android.library'\r\napply plugin: 'maven-publish'\r\napply plugin: 'net.researchgate.release'\r\n\r\n...\r\n\r\npublishing {\r\n    repositories {\r\n        maven {\r\n            name \"<repo-name>\"\r\n            url \"<repo-url>\"\r\n        }\r\n    }\r\n    publications {\r\n        aarArchive(MavenPublication) {\r\n            artifactId = '<artifact-name>'\r\n            artifact(\"build/outputs/aar/library-release.aar\") {\r\n                extension \"aar\"\r\n            }\r\n            pom.withXml {\r\n                def pomXml = asNode()\r\n                pomXml.appendNode('name', '<Artifact Name>')\r\n                pomXml.appendNode('description',\r\n                        'An Android library (.aar) used to integrate ' +\r\n                                '<description>')\r\n                def parentPomNode = pomXml.appendNode('parent')\r\n                parentPomNode.appendNode('groupId', parentPomGroupId)\r\n                parentPomNode.appendNode('artifactId', parentPomArtifactId)\r\n                parentPomNode.appendNode('version', parentPomVersion)\r\n            }\r\n        }\r\n    }\r\n}\r\n...\r\n```\r\n\r\nWhen running ```./gradlew release```:\r\n\r\n```\r\n* What went wrong:\r\nA problem occurred evaluating project ':library'.\r\n> Cannot configure the 'publishing' extension after it has been accessed.\r\n```\r\n\r\nAnd with debug and stacktrace on:\r\n\r\n```\r\n20:35:08.512 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:\r\n20:35:08.512 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating project ':library'.\r\n20:35:08.512 [ERROR] [org.gradle.BuildExceptionReporter] > Cannot configure the 'publishing' extension after it has been accessed.\r\n20:35:08.512 [ERROR] [org.gradle.BuildExceptionReporter]\r\n20:35:08.512 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:\r\n20:35:08.513 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating project ':library'.\r\n20:35:08.513 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)\r\n20:35:08.514 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:148)\r\n20:35:08.514 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)\r\n20:35:08.514 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)\r\n20:35:08.514 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)\r\n20:35:08.514 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:59)\r\n20:35:08.514 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:504)\r\n20:35:08.515 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:83)\r\n20:35:08.515 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47)\r\n20:35:08.515 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:85)\r\n20:35:08.515 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:76)\r\n20:35:08.515 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(CommandLineTaskParser.java:42)\r\n20:35:08.515 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:44)\r\n20:35:08.516 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)\r\n20:35:08.516 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23)\r\n20:35:08.516 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48)\r\n20:35:08.516 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:47)\r\n20:35:08.516 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)\r\n20:35:08.517 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23)\r\n20:35:08.517 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48)\r\n20:35:08.517 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:44)\r\n20:35:08.517 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)\r\n20:35:08.517 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter.java:35)\r\n20:35:08.517 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)\r\n20:35:08.518 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)\r\n20:35:08.518 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)\r\n20:35:08.518 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)\r\n20:35:08.518 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)\r\n20:35:08.518 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)\r\n20:35:08.518 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)\r\n20:35:08.519 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)\r\n20:35:08.519 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:47)\r\n20:35:08.519 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)\r\n20:35:08.519 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)\r\n20:35:08.519 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:35)\r\n20:35:08.519 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)\r\n20:35:08.520 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)\r\n20:35:08.520 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)\r\n20:35:08.520 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)\r\n20:35:08.520 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)\r\n20:35:08.521 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71)\r\n20:35:08.521 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69)\r\n20:35:08.521 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.util.Swapper.swap(Swapper.java:38)\r\n20:35:08.521 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69)\r\n20:35:08.521 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)\r\n20:35:08.522 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)\r\n20:35:08.522 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)\r\n20:35:08.522 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)\r\n20:35:08.522 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:70)\r\n20:35:08.522 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)\r\n20:35:08.523 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)\r\n20:35:08.523 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39)\r\n20:35:08.523 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)\r\n20:35:08.523 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:46)\r\n20:35:08.523 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)\r\n20:35:08.523 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)\r\n20:35:08.524 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.InvalidUserDataException: Cannot configure the 'publishing' extension after it has been accessed.\r\n20:35:08.524 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.api.internal.plugins.ExtensionsStorage$DeferredConfigurableExtensionHolder.configureLater(ExtensionsStorage.java:174)\r\n20:35:08.524 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.api.internal.plugins.ExtensionsStorage$DeferredConfigurableExtensionHolder.configure(ExtensionsStorage.java:168)\r\n20:35:08.524 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.api.internal.plugins.ExtensionsStorage.configureExtension(ExtensionsStorage.java:69)\r\n20:35:08.524 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.api.internal.plugins.DefaultConvention$ExtensionsDynamicObject.invokeMethod(DefaultConvention.java:207)\r\n20:35:08.525 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)\r\n20:35:08.525 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)\r\n20:35:08.525 [ERROR] [org.gradle.BuildExceptionReporter] \tat build_8dwqa41ytgl29bu4nv7mrfvhb.run(/Users/akord/src/atlassian-account-android-library/library/build.gradle:60)\r\n20:35:08.525 [ERROR] [org.gradle.BuildExceptionReporter] \tat org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)\r\n20:35:08.525 [ERROR] [org.gradle.BuildExceptionReporter] \t... 55 more\r\n20:35:08.525 [ERROR] [org.gradle.BuildExceptionReporter]\r\n20:35:08.526 [LIFECYCLE] [org.gradle.BuildResultLogger]\r\n20:35:08.526 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED\r\n```"}}