简体   繁体   English

Gradle 构建中的 Axion 发布插件错误

[英]Axion Release Plugin Error on Gradle Build

I've been struggling to build an Android lib and publish it to Azure Devops Artifacts using Gradle.我一直在努力构建一个 Android 库并使用 Gradle 将其发布到 Azure Devops Artifacts。

I finally published it yesterday, and today I came across the need to version it automatically, so I'm trying to use this plugin: https://plugins.gradle.org/plugin/pl.allegro.tech.build.axion-release我昨天终于发布了它,今天我遇到了自动版本的需要,所以我尝试使用这个插件: https : //plugins.gradle.org/plugin/pl.allegro.tech.build.axion-释放
https://axion-release-plugin.readthedocs.io/en/latest/ https://axion-release-plugin.readthedocs.io/en/latest/

So, making it shorter, I'm simply not able to apply the plugin, I'm not even using it, just applied it, and it breaks instantly.所以,让它更短,我根本无法应用插件,我什至没有使用它,只是应用它,它立即中断。

Any ideas on the reason?关于原因的任何想法?

I applied it based on this:我基于此应用它:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "pl.allegro.tech.build:axion-release-plugin:1.11.0"
  }
}

apply plugin: "pl.allegro.tech.build.axion-release" version '1.11.0'

The error I'm getting is this:我得到的错误是这样的:

org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'core'.

* What went wrong:
A problem occurred evaluating root project 'core'.
> Cannot invoke method version() on null object

Ok, it was the version info in the: apply plugin: "pl.allegro.tech.build.axion-release" version '1.11.0'好的,这是: apply plugin: "pl.allegro.tech.build.axion-release" version '1.11.0'的版本信息

Using: apply plugin: "pl.allegro.tech.build.axion-release"使用: apply plugin: "pl.allegro.tech.build.axion-release"

It works.有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM