I created an SDK package today, but for some reason I cannot seem to use it…!
How the package was created
It is published to GitHub packages under these instructions. I had saved personal access token to environment variable on my machine, as well as my username, under GITHUB_TOKEN
and GITHUB_ACTOR
, respectively.
My build.gradle
look like :
plugins {
id 'java'
id 'maven-publish'
id "com.katalon.gradle-plugin" version "0.1.1"
}
group = 'com.mikewarren.katalonstudiosdk'
version = '1.0'
dependencies {
implementation 'com.github.javafaker:javafaker:1.0.2'
}
repositories {
mavenCentral()
}
sourceSets {
main {
groovy {
srcDirs = ['Keywords', 'Libs']
excludes = ['CustomKeywords.groovy', "Temp*.groovy"]
}
}
test {
groovy {
srcDirs = ['Include/scripts/groovy']
}
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/MikeWarren2014/KatalonStudioSDK")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
artifactId = 'katalon-studio-sdk'
from components.java
}
}
}
I also, before all this, set up a GitHub action to publish the package, but it did NOT get hit when I said gradle clean publish --info
:
When I try to use the package
Here is the package in question. I follow GitHub’s instructions and hit a brick wall…
Here’s the build.gradle
for the consumer project:
plugins {
id 'groovy'
id "com.katalon.gradle-plugin" version "0.1.0"
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/MikeWarren2014/KatalonStudioSDK")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation 'me.mikewarren.katalonstudiosdk:katalon-studio-sdk:1.0'
}
When I gradle clean build
, it "succeeds`:
However, when I search the consumer project for the katalon-studio-sdk-1.0.jar
or katalon-studio-sdk-1.0-all.jar
, it’s nowhere!
I then remember this is a Katalon Studio project, which gives me the idea to gradle katalonCopyDependencies
, only to be met with this:
I try to crawl the URL in my browser, and get prompted by GitHub for my credentials. Looks promising…
The page it returns for my doing so, is text page that simply says:
maven package "me.mikewarren.katalonstudiosdk.katalon-studio-sdk" does not exist under owner "MikeWarren2014"
What am I doing wrong here?