Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions oss-licenses-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,32 @@ dependencies {
group = 'com.google.android.gms'
version = '0.10.6'

apply plugin: 'maven'
apply plugin: 'maven-publish'

repositories {
google()
mavenCentral()
}

// upload and build in local
uploadArchives {
publishing {
repositories {
mavenDeployer {
repository(url: uri('../repo'))
pom.project {
maven {
url = uri('../repo')
}
}

publications {
library(MavenPublication) {
from components.java
pom {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}

}
}
}
Expand Down
Binary file modified oss-licenses-plugin/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
53 changes: 33 additions & 20 deletions oss-licenses-plugin/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 24 additions & 19 deletions oss-licenses-plugin/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.gradle.api.artifacts.ResolvedDependency
import org.gradle.api.artifacts.component.ModuleComponentIdentifier
import org.gradle.api.artifacts.result.ResolvedArtifactResult
import org.gradle.api.internal.artifacts.DefaultModuleIdentifier
import org.gradle.internal.component.AmbiguousVariantSelectionException
import org.gradle.internal.component.resolution.failure.exception.ArtifactSelectionException
import org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier
import org.gradle.maven.MavenModule
import org.gradle.maven.MavenPomArtifact
Expand Down Expand Up @@ -123,7 +123,7 @@ class DependencyUtil {
if (resolvedDependency.getModuleVersion() == LOCAL_LIBRARY_VERSION) {
/**
* Attempting to getAllModuleArtifacts on a local library project will result
* in AmbiguousVariantSelectionException as there are not enough criteria
* in ArtifactSelectionException as there are not enough criteria
* to match a specific variant of the library project. Instead we skip the
* the library project itself and enumerate its dependencies.
*/
Expand All @@ -146,7 +146,7 @@ class DependencyUtil {
}
}
}
} catch (AmbiguousVariantSelectionException exception) {
} catch (ArtifactSelectionException exception) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tresat on older versions of Gradle running this branch may throw an exception when JVM tries to find the catch block for AmbiguousVariantSelectionException when it is thrown, because this new ArtifactSelectionException might not be available in those old versions of Gradle. (I have no proof, just something that came to mind when seeing this change.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely something to test.

logger.info("Failed to process ${resolvedDependency.name}", exception)
}
}
Expand Down