-
-
Notifications
You must be signed in to change notification settings - Fork 30
feat: publish to bintray #121
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,15 @@ | ||
| import com.jfrog.bintray.gradle.tasks.BintrayPublishTask | ||
| import com.jfrog.bintray.gradle.tasks.BintrayUploadTask | ||
| import org.gradle.api.publish.PublishingExtension | ||
|
|
||
| plugins { | ||
| `java-library` | ||
| `maven-publish` | ||
| signing | ||
| kotlin("jvm") | ||
| jacoco | ||
| id("net.ltgt.errorprone") | ||
| id(Config.PublishPlugins.bintrayPlugin) | ||
| } | ||
|
|
||
| dependencies { | ||
|
|
@@ -49,4 +56,60 @@ tasks { | |
| dependsOn(jacocoTestCoverageVerification) | ||
| dependsOn(jacocoTestReport) | ||
| } | ||
|
|
||
| withType<BintrayUploadTask> { | ||
| bintray { | ||
| user = System.getenv("BINTRAY_USER") | ||
| key = System.getenv("BINTRAY_KEY") | ||
| with(pkg) { | ||
| repo = "mvn" | ||
| name = project.name | ||
| userOrg = "getsentry" | ||
| setLicenses("MIT") | ||
| websiteUrl = "https://sentry.io" | ||
| vcsUrl = "https://github.com/getsentry/sentry-android" | ||
| setLabels("sentry", "getsentry", "error-tracking", "crash-reporting") | ||
| with(version) { | ||
| name = project.version.toString() | ||
| vcsTag = project.version.toString() | ||
| desc = project.description.toString() | ||
| } | ||
| } | ||
| println("version: $version") | ||
| setPublications(project.name) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| publishing { | ||
| publications { | ||
| register(project.name, MavenPublication::class) { | ||
| if (project.hasProperty("android")) { | ||
| artifact("$buildDir/outputs/aar/${project.name}-release.aar") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the sentry-core module, we don't need android stuff in here
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, this is all very provisional. It will all move to the main gradle file |
||
| } else { | ||
| from(components["java"]) | ||
| } | ||
| groupId = project.group.toString() | ||
| artifactId = project.name | ||
| version = project.version.toString() | ||
| // artifact(sourcesJar) | ||
| // artifact(javadocJar) | ||
|
|
||
| if (project.hasProperty("android")) { | ||
| pom { | ||
| withXml { | ||
| asNode().appendNode("dependencies").let { depNode -> | ||
| configurations.implementation.get().allDependencies.forEach { | ||
| depNode.appendNode("dependency").apply { | ||
| appendNode("groupId", it.group) | ||
| appendNode("artifactId", it.name) | ||
| appendNode("version", it.version) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ import org.jetbrains.kotlin.config.KotlinCompilerVersion | |
| plugins { | ||
| id("com.android.application") | ||
| kotlin("android") | ||
| // id("io.sentry.android.gradle") how to add sentry gradle plugin | ||
| id(Config.PublishPlugins.bintrayPlugin) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should go into the modules that would be published, not in the sample app.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right, just playing around. Draft PR
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll add a description of the goal |
||
| } | ||
|
|
||
| android { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marandaneto I guess merging #70 will affect this bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a problem