maven-publish

BootJar + MavenJar. Artifact wasn't produced by this build

为君一笑 提交于 2020-08-24 10:37:22
问题 I have a sample project with the following hierearhy: Sample (root) -- model (simple jar) -- api (springboot jar) I want to publish both generated jars: plain jar & bootJar to my localRepository. gradlew clean build -xTest publishToMavenLocal However, the following error occures: * What went wrong: Execution failed for task ':api:publishMavenJavaPublicationToMavenLocal'. > Failed to publish publication 'mavenJava' to repository 'mavenLocal' > Artifact api.jar wasn't produced by this build.

why android gradle maven publish artifact bundleRelease not found

回眸只為那壹抹淺笑 提交于 2020-01-19 12:41:12
问题 When i sync project, android studio warn could not get unknown property 'bundleRelease' for object of type org.gradle.api.publish.maven.internal.publication.DefaultMavenPublication. I add project.afterEvaluate{//block} ,but it doesn't work. What should i do to set the artifact 回答1: Android Gradle Plugin 3.3.x (at least -alpha releases at the time of writing this answer) has breaking change, task bundleRelease was renamed to bundleReleaseAar So the solution is to use: bundleReleaseAar instead

Gradle: how to make rule-created ZipTask as maven publication artifact

我与影子孤独终老i 提交于 2020-01-15 10:04:12
问题 I want to create a maven publication from inside a RuleSource that will be published via the maven-publish plugin. The artifacts of the publication are the outputs from a series of Zip tasks that are created from rules. When I try to add the artifacts, I get a circular rule exception. Here is my very simple build.gradle : buildscript { repositories { mavenCentral() } dependencies { } } task wrapper(type: Wrapper) { gradleVersion = '3.3' } apply plugin: 'groovy' apply plugin: 'testpub'

Gradle: how to make rule-created ZipTask as maven publication artifact

為{幸葍}努か 提交于 2020-01-15 10:03:16
问题 I want to create a maven publication from inside a RuleSource that will be published via the maven-publish plugin. The artifacts of the publication are the outputs from a series of Zip tasks that are created from rules. When I try to add the artifacts, I get a circular rule exception. Here is my very simple build.gradle : buildscript { repositories { mavenCentral() } dependencies { } } task wrapper(type: Wrapper) { gradleVersion = '3.3' } apply plugin: 'groovy' apply plugin: 'testpub'

How to import dependecies from build.gradle to pom.xml

自古美人都是妖i 提交于 2020-01-04 05:45:22
问题 I use maven-publish plugin for deploying android library( .aar ). My library has another dependencies, which are also .aar How can I import all dependencies from build.gradle , dependencies section: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1' compile 'com.android.support:support-v4:23.1.1' compile ('com.android.support:recyclerview-v7:22.2.1'){ exclude group: 'com.android.support

Android: library project with Retrofit results in NoClassDefFoundError

浪子不回头ぞ 提交于 2019-12-24 20:51:05
问题 I'm trying to build an android library project which uses OkHttp and Retrofit to grant access to our REST-backend. It seems to be working as long as I use api instead of implementation on my gradle-dependency for com.squareup.retrofit2:converter-gson . It seems that this is the only dependency needing this (all others can used with implementation ). When using implementation here as well, the calling app will crash with NoClassDefFoundError : java.lang.NoClassDefFoundError: Failed resolution

How to publish in my maven local repository an existing aar with gradle?

跟風遠走 提交于 2019-12-23 06:31:22
问题 I have a project that have the following structure: projectRoot build.gradle module1/ build.gradle artifact1.aar module2/ .... My artifact1.aar is a compiled artifact and i have no access to the sources. my module 1 gradle build file is the following: configurations.maybeCreate("default") artifacts.add("default", file('artifact1.aar')) With this the code contains in the .aar is available in module 2 by simply reference a gradle project dependency. But i want to publish the .aar in my maven

Gradle: Using 'maven-publish' plugin in custom standalone plugin

旧时模样 提交于 2019-12-23 03:37:08
问题 Almost feeling like spamming after my third question, cause my questions seem so trivial. But I just don't find any help in Gradle Docs for my cases and also other asked questions on stackoverflow weren't helping. This time: I can't use the maven-publish plugin in my own standalone custom plugin. The code of my plugin so far: package com.sample.gradle; import org.gradle.api.Project; import org.gradle.api.Plugin; public class SampleGradlePlugin implements Plugin<Project> { public void apply