@@ -43,83 +43,100 @@ dependencies {
4343 implementation localGroovy()
4444}
4545
46- // In app-services, we need all these tasks, which do nothing, so this module behaves like
47- // our others and we do not need to special case it in automation.
48- if (! gradle. root. hasProperty(" mozconfig" )) {
49- tasks. register(" lintRelease" ) {
50- doLast {}
51- }
46+ tasks. register(" lintRelease" ) {
47+ doLast {
48+ // Do nothing. We execute the same set of tasks for all our modules in parallel on taskcluster.
49+ // This project doesn't have a lint task. To avoid special casing our automation I just added
50+ // an empty lint task here.
51+ }
52+ }
5253
53- tasks. register(" assembleAndroidTest" ) {
54- doLast {}
55- }
54+ tasks. register(" assembleAndroidTest" ) {
55+ doLast {
56+ // Do nothing. Like the `lint` task above this is just a dummy task so that this module
57+ // behaves like our others and we do not need to special case it in automation.
58+ }
59+ }
5660
57- tasks. register(" assembleRelease" ) {
58- doLast {}
59- }
61+ tasks. register(" assembleRelease" ) {
62+ doLast {
63+ // Do nothing. Like the `lint` task above this is just a dummy task so that this module
64+ // behaves like our others and we do not need to special case it in automation.
65+ }
66+ }
6067
61- tasks. register(" testRelease" ) {
62- doLast {}
63- }
68+ tasks. register(" testRelease" ) {
69+ doLast {
70+ // Do nothing. Like the `lint` task above this is just a dummy task so that this module
71+ // behaves like our others and we do not need to special case it in automation.
72+ }
73+ }
6474
65- tasks. register(" checkMavenArtifacts" ) {
66- doLast {}
75+ tasks. register(" checkMavenArtifacts" ) {
76+ doLast {
77+ // Do nothing. Like the `lint` task above this is just a dummy task so that this module
78+ // behaves like our others and we do not need to special case it in automation.
6779 }
80+ }
6881
69- // publish only makes sense in app-services.
70- publishing {
71- publications {
72- mavenJava(MavenPublication ) {
73- from components. java
74-
75- pom {
76- groupId = rootProject. config. componentsGroupId
77- artifactId = archivesBaseName
78- description = project. ext. description
79- version = rootProject. config. componentsVersion + (rootProject. hasProperty(' local' ) ? ' -' + rootProject. property(' local' ) : ' ' )
80-
81- licenses {
82- license {
83- name = properties. libLicense
84- url = properties. libLicenseUrl
85- }
86- }
82+ // Must match the implementation in publish.gradle
83+ static def getLocalPublicationTimestamp () {
84+ def date = new Date ()
85+ return date. format(' yyyyMMddHHmmss' )
86+ }
8787
88- developers {
89- developer {
90- name = ' Mozilla Nimbus Team'
91- email = ' nimbus-team@mozilla.com'
92- }
88+ publishing {
89+ publications {
90+ mavenJava(MavenPublication ) {
91+ from components. java
92+
93+ pom {
94+ groupId = rootProject. config. componentsGroupId
95+ artifactId = archivesBaseName
96+ description = project. ext. description
97+ version = rootProject. config. componentsVersion + (rootProject. hasProperty(' local' ) ? ' -' + rootProject. property(' local' ) : ' ' )
98+
99+ licenses {
100+ license {
101+ name = properties. libLicense
102+ url = properties. libLicenseUrl
93103 }
104+ }
94105
95- scm {
96- connection = properties . libVcsUrl
97- developerConnection = properties . libVcsUrl
98- url = properties . libUrl
106+ developers {
107+ developer {
108+ name = ' Mozilla Nimbus Team '
109+ email = ' nimbus-team@mozilla.com '
99110 }
100111 }
101- }
102- }
103112
104- if (it . hasProperty( ' android ' )) {
105- android {
106- singleVariant( ' release ' ) {
107- withSourcesJar()
113+ scm {
114+ connection = properties . libVcsUrl
115+ developerConnection = properties . libVcsUrl
116+ url = properties . libUrl
108117 }
109118 }
110119 }
120+ }
111121
112- repositories {
113- maven {
114- url = " $buildDir /maven"
122+ if (it. hasProperty(' android' )) {
123+ android {
124+ singleVariant(' release' ) {
125+ withSourcesJar()
115126 }
116127 }
117128 }
118129
119- publishing . publications . withType( MavenPublication ) . each { publication ->
120- def checkFileSizeTask = task " checkLibSizeForMavenArtifact- ${ publication.artifactId } " ( type : Exec ) {
121- commandLine " ${ rootProject.projectDir } /automation/check_artifact_size.sh " , project . buildDir, publication . artifactId
130+ repositories {
131+ maven {
132+ url = " $b uildDir /maven "
122133 }
123- checkMavenArtifacts. dependsOn(checkFileSizeTask)
124134 }
125135}
136+
137+ publishing. publications. withType(MavenPublication ). each {publication ->
138+ def checkFileSizeTask = task " checkLibSizeForMavenArtifact-${ publication.artifactId} " (type : Exec ) {
139+ commandLine " ${ rootProject.projectDir} /automation/check_artifact_size.sh" , project. buildDir, publication. artifactId
140+ }
141+ checkMavenArtifacts. dependsOn(checkFileSizeTask)
142+ }
0 commit comments