Commit feddd369 authored by MozLando's avatar MozLando
Browse files

Merge #5476



5476: Add renameSnapshotArtifacts to glean-gradle-plugin r=mdboom a=mdboom

This is an attempt to fix the issue in #5464, just by copying the `renameSnapshotArtifacts` task to `glean-gradle-plugin`'s build. 

I'm not sure how to test this locally or prior to merging, though...
Co-authored-by: default avatarMichael Droettboom <mdboom@gmail.com>
Co-authored-by: default avatarJohan Lorenzo <jlorenzo@mozilla.com>
parents 4b427fdc 0ee808db
......@@ -407,5 +407,5 @@ projects:
tooling-glean-gradle:
path: components/tooling/glean-gradle-plugin
description: 'A Gradle plugin to generate code for Glean metrics.'
publish: false
publish: true
artifact-type: jar
......@@ -76,6 +76,8 @@ def does_file_name_contain_timestamp(filename):
for extension, hash_extension in itertools.product(ARTIFACT_EXTENSIONS, HASH_EXTENSIONS):
if filename.endswith(extension + hash_extension):
if "-unspecified" in filename:
return False
return True
return False
......
......@@ -20,16 +20,22 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
publishing {
publications {
maven(MavenPublication) {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
pom {
groupId = config.componentsGroupId
artifactId = archivesBaseName
description = project.ext.description
version = config.componentsVersion + (project.hasProperty('snapshot') ? '-SNAPSHOT' : '')
version = config.componentsVersion + (project.hasProperty('snapshot') ? '-SNAPSHOT' : (project.hasProperty('local') ? '-local' + getLocalPublicationTimestamp() : ''))
licenses {
license {
......@@ -53,6 +59,21 @@ publishing {
}
}
}
repositories {
maven {
url = "$buildDir/maven"
}
}
}
task renameSnapshotArtifacts(type: Exec) {
dependsOn publish
def renameScript = "${rootDir}/automation/taskcluster/rename_snapshot_artifacts.py"
def mavenBuildDir = "${project.buildDir}/maven"
commandLine 'python', renameScript, '--path', mavenBuildDir, '--timestamp', (project.hasProperty('timestamp') ? timestamp : '')
}
task lintRelease {
......@@ -79,4 +100,3 @@ compileTestKotlin {
jvmTarget = "1.8"
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment