-
Notifications
You must be signed in to change notification settings - Fork 29
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
Task 'publishToSonatype' not found #219
Comments
I would be easier having more information about your (publishing) configuration. |
same problem, below is my config:
maven-publish.gradle
./gradlew tasks
|
this is my example module gradle i am used android studio ide. the file build successfully created publication file. but the file not uploaded |
i solved for my issues !! i just need to add nexusPublishing { } Like this // Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.21' apply false
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}
File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
// Read local.properties file first if it exists
Properties p = new Properties()
new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) }
p.each { name, value -> ext[name] = value }
}
nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = ossrhUsername
password = ossrhPassword
stagingProfileId = rootProject.ext["sonatypeStagingProfileId"]
}
}
}
apply plugin: 'io.github.gradle-nexus.publish-plugin'
// evaluate and some code
test get a tasks
|
@YovanggaAnandhika I'm glad you were able to fix your problem before I had a chance to analyze the files. While you should get a clear error trying to apply the plugin on the non-root project:
I wonder, if we could easily detect the situation you had. Would you mind creating a feature request about that? Btw, please keep in mind that the Android projects are not officially supported - #75, so unfortunately you might encounter also some other problems :-/. |
gradlew tasks
Where Task name for Create Repository to nexus manager ?
The text was updated successfully, but these errors were encountered: