#I just cant get my build.gradle to work

1 messages · Page 1 of 1 (latest)

cosmic copper
#

Im trying to automate publishing my Java package to maven central but nothing will work regardless of what I do, I have no idea whats going on and at this point im too tired of it to try around more, I have attached my build.gradle file since I cant paste it in here, this is the error im getting in my workflow

> Task :publishMavenJavaPublicationToGitHubPackagesRepository FAILED
10 actionable tasks: 9 executed, 1 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':publishMavenJavaPublicationToGitHubPackagesRepository'.
> Failed to publish publication 'mavenJava' to repository 'GitHubPackages'
   > Invalid publication 'mavenJava': artifactId (String1_groovyProxy@748e70cf) is not a valid Maven identifier ([A-Za-z0-9_\-.]+).

I dont even know whats going on here anymore

slim marshBOT
#

<@&987246399047479336> please have a look, thanks.

slim marshBOT
cosmic copper
cunning warren
#

Well the message just say it, your artifact ID is invalid

cosmic copper
#

both LanguageCore and languagecore are therefore invalid which is impossible

#

both LanguageCore and languagecore fit within the target regex expression

cunning warren
#

It say string 1 groovy proxy

cosmic copper
#

thats the entire problem here

cunning warren
#

So that mean it use the string ref as the value

#

You wrote it badly in the gradle file

cosmic copper
#

then how do i write it better

#

also this one works

#

both reference project.name and only the archive one works properly

cunning warren
#

Well do that

cosmic copper
#

do what

cunning warren
#

Put them in a string

mint condor
cosmic copper
cunning warren
#

Share it

cosmic copper
# cunning warren Share it
Downloading https://services.gradle.org/distributions/gradle-7.1.1-bin.zip
..........10%...........20%...........30%..........40%...........50%...........60%..........70%...........80%...........90%...........100%

Welcome to Gradle 7.1.1!

Here are the highlights of this release:
 - Faster incremental Java compilation
 - Easier source set configuration in the Kotlin DSL

For more details see https://docs.gradle.org/7.1.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :clean UP-TO-DATE
> Task :compileJava
> Task :processResources NO-SOURCE
> Task :classes
> Task :jar
> Task :assemble
> Task :compileTestJava
> Task :processTestResources
> Task :testClasses
> Task :test
> Task :check
> Task :build
> Task :generateMetadataFileForMavenJavaPublication
> Task :generatePomFileForMavenJavaPublication
> Task :signMavenJavaPublication
> Task :publishMavenJavaPublicationToGitHubPackagesRepository FAILED
10 actionable tasks: 9 executed, 1 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':publishMavenJavaPublicationToGitHubPackagesRepository'.
> Failed to publish publication 'mavenJava' to repository 'GitHubPackages'
   > Invalid publication 'mavenJava': artifactId (String1_groovyProxy@40fd9f58) is not a valid Maven identifier ([A-Za-z0-9_\-.]+).

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 22s
Error: Process completed with exit code 1.
slim marshBOT
cunning warren
#

How good are you with kts? I found that groovy dsl is very much not clear sometimes.

cosmic copper
#

i never rly used it

cosmic copper
#

i got past that error but now i keep getting 401 errors from maven

#

this entire publishing system is stupid

#

the package gets pushed to github packages but maven throws a tantrum

mint condor
cosmic copper
#

the namespace also has snapshots enabled

mint condor
#

This error means it failed to log in

cosmic copper
#

the user token pair is added properly into my repository secrets