spierce7
07/06/2019, 2:54 AMserebit
07/06/2019, 3:13 AMspierce7
07/06/2019, 3:20 AMserebit
07/06/2019, 3:22 AMenableFeaturePreview("GRADLE_METADATA")
in settings.gradle.kts
. You can declare each platform dependency (strife-client-jvm
, strife-client-metadata
) independently, or just add a dependency on strife-client
in common and it applies the rest to the respective platformsspierce7
07/06/2019, 3:24 AMafterEvaluate {
tasks.withType<Jar> {
// set jar base names to module paths, like strife-core and strife-samples-embeds
archiveBaseName.set(fullPath)
}
}
// will only run in subprojects with the maven-publish plugin already applied
pluginManager.withPlugin("maven-publish") {
publishing.configureBintray("serebit", "public", rootProject.name, System.getenv("BINTRAY_KEY"))
afterEvaluate {
publishing.publications.filterIsInstance<MavenPublication>().forEach {
// replace project names in artifact with their module paths, ie core-jvm becomes strife-core-jvm
it.artifactId = it.artifactId.replace(name, fullPath)
}
}
}
maven-publish
pluginserebit
07/06/2019, 3:29 AMconfigureBintray
, which is a function in buildSrc
that configures the Bintray repository. Everything else is done automatically via applying the plugin in subprojects due to the above call to pluginManager.withPlugin
maven-publish
plugin by itselfspierce7
07/06/2019, 3:30 AMserebit
07/06/2019, 3:30 AMfun PublishingExtension.configureBintray(
userName: String,
repositoryName: String,
projectName: String,
accessKey: String?
) = repositories.maven("<https://api.bintray.com/maven/serebit/$repositoryName/$projectName/;publish=0>") {
name = "bintray"
credentials {
username = userName
accessKey?.let { password = it }
}
}
spierce7
07/06/2019, 3:31 AMserebit
07/06/2019, 3:32 AMspierce7
07/06/2019, 3:32 AMserebit
07/06/2019, 3:32 AMval userName = "serebit"
val repositoryName = "public"
val projectName = "strife"
publishing.repositories.maven("<https://api.bintray.com/maven/$userName/$repositoryName/$projectName/;publish=0>") {
name = "bintray"
credentials {
username = userName
accessKey?.let { password = it }
}
}
spierce7
07/06/2019, 3:33 AMserebit
07/06/2019, 3:33 AMspierce7
07/06/2019, 3:36 AMjcenter()
repo right?serebit
07/06/2019, 3:36 AMpublishAllPublicationsToBintrayRepository
, so long as your project exists at the URL you pass to the call to maven
, it'll upload your artifacts to Bintray. Then you need to go to the Bintray website and click on the button that says "Publish artifacts"spierce7
07/06/2019, 3:37 AMserebit
07/06/2019, 3:37 AMspierce7
07/06/2019, 3:38 AMserebit
07/06/2019, 3:39 AMpublic
, but maven
also works. So long as it's apparent what it's forcom.scott
, it should be com.scott.project
com.scott
, then you'll run into conflicts when adding other projects to jcenter, because group names in jcenter need to be uniquespierce7
07/06/2019, 3:43 AMmaven-publish
to your root gradle file so that you could resolve publishing and other things for the gradle for kotlin script gradle?serebit
07/06/2019, 3:44 AMmaven-publish
password
under credentials
should be your api key, which you can find in "edit profile" under (appropriately) API Keyspierce7
07/06/2019, 4:07 AMserebit
07/06/2019, 4:08 AMspierce7
07/06/2019, 4:20 AMpublishing.configureBintray("serebit", "public", rootProject.name, System.getenv("BINTRAY_KEY"))
serebit
07/06/2019, 4:29 AMspierce7
07/06/2019, 4:42 AMval fullPath = "${rootProject.name}${project.path.replace(":", "-")}"
serebit
07/06/2019, 4:49 AMspierce7
07/06/2019, 4:49 AMserebit
07/06/2019, 4:50 AMspierce7
07/06/2019, 4:51 AMserebit
07/06/2019, 4:53 AMspierce7
07/06/2019, 4:54 AMserebit
07/06/2019, 4:56 AMspierce7
07/06/2019, 4:57 AMserebit
07/06/2019, 4:57 AMspierce7
07/06/2019, 5:00 AMserebit
07/06/2019, 5:04 AMspierce7
07/06/2019, 5:13 AMserebit
07/06/2019, 5:53 AMpublish=1
kpgalligan
07/06/2019, 1:28 PMFudge
07/06/2019, 1:52 PMspierce7
07/06/2019, 2:07 PMWe can see that under the groupID "dev/scottpierce/kotlin-html" there are four packages:
1.kotlin-html
2.kotlin-html-jvm
3.kotlin-html-ktor
4.kotlin-html-metadata
We can only approve one path for a single package.
For e.g "dev/scottpierce/kotlin-html/kotlin-html".
If the inclusion path you have requested to include is for a single package, it is missing one of the components. Otherwise, if the subpaths are for different packages, submit an inclusion for each.
Their terminology is weird. So I want one group id, but many artifacts inside that group id from a maven wagon perspective.serebit
07/06/2019, 2:29 PMspierce7
07/06/2019, 2:32 PMserebit
07/06/2019, 2:34 PMspierce7
07/06/2019, 2:35 PMserebit
07/06/2019, 2:35 PMspierce7
07/06/2019, 2:36 PMserebit
07/06/2019, 2:36 PMcom/serebit/strife
spierce7
07/06/2019, 2:38 PMserebit
07/06/2019, 2:38 PMspierce7
07/06/2019, 2:38 PMserebit
07/06/2019, 2:39 PMkpgalligan
07/06/2019, 3:16 PMserebit
07/06/2019, 3:39 PMkpgalligan
07/06/2019, 3:54 PMserebit
07/06/2019, 3:55 PMkpgalligan
07/06/2019, 5:22 PMspierce7
07/06/2019, 6:36 PMHi spierce7,
Thank you for responding,
Please be informed that a valid path must contain a group ID and an artifact ID. For example, in the package path
“dev/scottpierce/kotlin-html/kotlin-html” the group ID is “dev/scottpierce/kotlin-html” and artefact ID is “ kotlin-html”.
If you request to add a package just by the Group ID, the request will be approved and all the artifact IDs under that group ID will be added to JCenter.
However, if you want to add more artifact IDs in the future with the same Group ID to the JCenter, you won’t be able to add it, as the Group ID already exists in JCenter. Please make sure that if you want to add a package in JCenter, provide us with a complete path (i.e. group ID+artifact ID). For multiple artifact IDs under the same group ID, please submit inclusion requests for each artifact ID.
Best regards,
Pranav Hegde
JFrog Support
serebit
07/06/2019, 6:38 PMspierce7
07/06/2019, 6:40 PMserebit
07/06/2019, 8:07 PMspierce7
07/06/2019, 8:50 PMserebit
07/06/2019, 8:51 PMspierce7
07/06/2019, 8:53 PM