Andrew O Hart
03/08/2022, 12:07 PMBig Chungus
03/08/2022, 12:12 PMAndrew O Hart
03/08/2022, 12:16 PMBig Chungus
03/08/2022, 12:19 PM./gradlew tasks | grep pom
Andrew O Hart
03/08/2022, 12:37 PMBig Chungus
03/08/2022, 12:42 PMAndrew O Hart
03/08/2022, 12:53 PMplugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("kotlinx-serialization")
id("com.android.library")
id("org.sonarqube")
id("org.owasp.dependencycheck")
id("com.squareup.sqldelight")
id("maven-publish")
}
group = "com.testmultiplatform"
version = "1.0"
kotlin {
android {
publishLibraryVariants("release", "debug")
}
}
Andrew O Hart
03/08/2022, 12:53 PMBig Chungus
03/08/2022, 12:54 PMAndrew O Hart
03/08/2022, 12:54 PMBig Chungus
03/08/2022, 12:54 PM./gradlew publishToMavenLocal --console=plain
and see what tasks referring to POM were executed.Andrew O Hart
03/08/2022, 12:57 PMAndrew O Hart
03/08/2022, 12:57 PMBig Chungus
03/08/2022, 12:58 PMbuild
folder to figure out where these generated POMs are placedAndrew O Hart
03/08/2022, 12:59 PMBig Chungus
03/08/2022, 1:00 PMpublishToMavenLocal
Andrew O Hart
03/08/2022, 1:01 PMAndrew O Hart
03/08/2022, 1:01 PMBig Chungus
03/08/2022, 1:01 PMAndrew O Hart
03/08/2022, 1:01 PMBig Chungus
03/08/2022, 1:03 PMAndrew O Hart
03/08/2022, 1:08 PMAndrew O Hart
03/08/2022, 1:08 PMBig Chungus
03/08/2022, 1:10 PM./gradlew clean generatePomFileForAndroidReleasePublication
beforehand to get rid of unrelated files.Andrew O Hart
03/08/2022, 1:16 PM// android library
def libraryName = "multiplatformtest-android"
def aarFiles = findFiles(glob: '**/outputs/**/*.aar')
echo "AarFiles: ${aarFiles}"
aarFilePath = aarFiles[0].path
def pomFiles = findFiles(glob: "**/outputs/**/${libraryName}-${versionInfo.FullSemVer}.xml")
echo "pomFiles: ${pomFiles}"
pomFilePath = pomFiles[0].path
nexusCommonFileName = "${env.companyMavenRelease}com/ourcompany/${libraryName}/${versionInfo.FullSemVer}/${libraryName}-${versionInfo.FullSemVer}"
echo "Uploading to: ${nexusCommonFileName}"
buildHelper.uploadFileToNexus(aarFilePath, 'application/java-archive', "${nexusCommonFileName}.aar", "$USERNAME", "$PASSWORD", os)
buildHelper.uploadFileToNexus(pomFilePath, 'application/xml', "${nexusCommonFileName}.pom", "$USERNAME", "$PASSWORD", os)
Andrew O Hart
03/08/2022, 1:17 PMBig Chungus
03/08/2022, 1:18 PM./gradlew doSomething -Pversion=4.2.0
Big Chungus
03/08/2022, 1:18 PMAndrew O Hart
03/08/2022, 1:20 PMversion = "1.0"
Andrew O Hart
03/08/2022, 1:20 PMAndrew O Hart
03/08/2022, 1:21 PMAndrew O Hart
03/08/2022, 1:21 PMAndrew O Hart
03/08/2022, 1:21 PMBig Chungus
03/08/2022, 1:21 PMAndrew O Hart
03/08/2022, 1:21 PMAndrew O Hart
03/08/2022, 1:22 PMAndrew O Hart
03/08/2022, 1:22 PMBig Chungus
03/08/2022, 1:24 PMpublishToMavenLocal
and grab required files from ~/.m2
although that would be a lot of unnecessary work for a few simple files.Big Chungus
03/08/2022, 1:24 PMAndrew O Hart
03/08/2022, 1:53 PM