Skip to content

Commit

Permalink
fixup! Upgrade to Gradle 8.1.1 and Android Gradle Plugin 8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
badboy committed Jul 12, 2023
1 parent 2c6d99d commit 9dc81d9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 37 deletions.
6 changes: 6 additions & 0 deletions glean-core/android-native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ android {
test.jniLibs.srcDirs += "$buildDir/rustJniLibs/desktop"
}

publishing {
singleVariant('release') {
withSourcesJar()
}
}

// Uncomment to include debug symbols in native library builds.
// packagingOptions { doNotStrip "**/*.so" }
}
Expand Down
21 changes: 3 additions & 18 deletions glean-core/android-native/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,12 @@ ext.configurePublish = { jnaForTestConfiguration = null ->
forUnitTestsJarTask.dependsOn(tasks["cargoBuild"])
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}

publishing {
publications {
aar(MavenPublication) {
artifact sourcesJar
// Can't publish Javadoc yet: Glean isn't well behaved.
// artifact javadocJar
project.afterEvaluate {
from components.release
}

// If this goes haywire with
// 'Cannot configure the 'publishing' extension after it has been accessed.',
Expand Down
6 changes: 6 additions & 0 deletions glean-core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ android {
test.resources.srcDirs += "${project(':glean-native').buildDir}/rustJniLibs/desktop"
}

publishing {
singleVariant('release') {
withSourcesJar()
}
}

// Uncomment to include debug symbols in native library builds.
// packagingOptions { doNotStrip "**/*.so" }

Expand Down
19 changes: 0 additions & 19 deletions glean-core/android/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,12 @@ ext.configurePublish = {
def theArtifactId = project.ext.artifactId
def theDescription = project.ext.description

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}

publishing {
publications {
aar(MavenPublication) {
project.afterEvaluate {
from components.release
}
//FIXME: is the artifact below now the default?
//artifact sourcesJar
// Can't publish Javadoc yet: Glean isn't well behaved.
// artifact javadocJar

// If this goes haywire with
// 'Cannot configure the 'publishing' extension after it has been accessed.',
Expand Down

0 comments on commit 9dc81d9

Please sign in to comment.