-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish to Gradle Plugin Portal (#429)
* Publish to Gradle Plugin Portal * Bump version for release candidate * Explain installation for kotlin and groovy * Update badge to point to Plugin Portal
- Loading branch information
1 parent
7ae8900
commit 2fd7ef4
Showing
9 changed files
with
114 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,20 +2,3 @@ org.gradle.jvmargs=-Xmx6g -XX:ReservedCodeCacheSize=2g -Dfile.encoding=UTF-8 | |
org.gradle.parallel=true | ||
org.gradle.configureondemand=true | ||
org.gradle.caching=true | ||
|
||
GROUP=com.github.triplet.gradle | ||
VERSION_NAME=2.0.0-rc1 | ||
|
||
POM_DESCRIPTION=Gradle Plugin to upload APKs and App Bundles to the Google Play Store | ||
|
||
POM_URL=https://github.com/Triple-T/gradle-play-publisher | ||
POM_SCM_URL=https://github.com/Triple-T/gradle-play-publisher | ||
POM_SCM_CONNECTION=scm:[email protected]:Triple-T/gradle-play-publisher.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:Triple-T/gradle-play-publisher.git | ||
|
||
POM_LICENCE_NAME=The MIT License (MIT) | ||
POM_LICENCE_URL=http://opensource.org/licenses/MIT | ||
POM_LICENCE_DIST=repo | ||
|
||
POM_DEVELOPER_ID=Triple-T | ||
POM_DEVELOPER_NAME=Triple-T-Dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import org.codehaus.groovy.runtime.InvokerHelper | ||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile | ||
|
||
plugins { | ||
`java-gradle-plugin` | ||
`kotlin-dsl` | ||
`maven-publish` | ||
groovy | ||
id("com.vanniktech.maven.publish") | ||
id("com.gradle.plugin-publish") version "0.10.0" | ||
} | ||
|
||
dependencies { | ||
|
@@ -33,29 +33,104 @@ tasks.withType<KotlinJvmCompile> { | |
} | ||
} | ||
|
||
group = "com.github.triplet.gradle" | ||
version = "2.0.0-rc2" | ||
|
||
gradlePlugin { | ||
plugins { | ||
create("play") { | ||
id = "com.github.triplet.play" | ||
implementationClass = "com.github.triplet.gradle.play.PlayPublisherPlugin" | ||
} | ||
plugins.create("play") { | ||
id = "com.github.triplet.play" | ||
displayName = "Gradle Play Publisher" | ||
description = "Gradle Play Publisher allows you to upload your App Bundle or APK " + | ||
"and other app details to the Google Play Store." | ||
implementationClass = "com.github.triplet.gradle.play.PlayPublisherPlugin" | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
fun PomFilterContainer.removeTestDependencies() { | ||
pom.whenConfigured { | ||
dependencies.removeIf { | ||
// Stolen from JetBrains' own sample at | ||
// https://github.com/JetBrains/kotlin/blob/v1.2.50/buildSrc/src/main/kotlin/plugins/PublishedKotlinModule.kt#L86 | ||
InvokerHelper.getMetaClass(it).getProperty(it, "scope") == "test" | ||
pluginBundle { | ||
website = "https://github.com/Triple-T/gradle-play-publisher" | ||
vcsUrl = "https://github.com/Triple-T/gradle-play-publisher" | ||
tags = listOf("android", "google-play") | ||
|
||
mavenCoordinates { | ||
groupId = project.group as String | ||
artifactId = "play-publisher" | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "Snapshots" | ||
url = uri("https://oss.sonatype.org/content/repositories/snapshots/") | ||
|
||
credentials { | ||
username = project.findProperty("SONATYPE_NEXUS_USERNAME")?.toString() | ||
password = project.findProperty("SONATYPE_NEXUS_PASSWORD")?.toString() | ||
} | ||
} | ||
} | ||
} | ||
|
||
val sourcesJar by tasks.registering(Jar::class) { | ||
classifier = "sources" | ||
from(sourceSets["main"].allSource) | ||
dependsOn(tasks["classes"]) | ||
} | ||
|
||
afterEvaluate { | ||
publishing.publications.named<MavenPublication>("pluginMaven") { | ||
artifactId = "play-publisher" | ||
artifact(sourcesJar.get()) | ||
|
||
pom { | ||
name.set("Google Play Publisher") | ||
description.set("Gradle Play Publisher is a plugin that allows you to upload your " + | ||
"App Bundle or APK and other app details to the " + | ||
"Google Play Store.") | ||
url.set("https://github.com/Triple-T/gradle-play-publisher") | ||
|
||
licenses { | ||
license { | ||
name.set("The MIT License (MIT)") | ||
url.set("http://opensource.org/licenses/MIT") | ||
distribution.set("repo") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("bhurling") | ||
name.set("Björn Hurling") | ||
roles.set(listOf("Owner")) | ||
timezone.set("+2") | ||
} | ||
developer { | ||
id.set("SUPERCILEX") | ||
name.set("Alex Saveau") | ||
email.set("[email protected]") | ||
roles.set(listOf("Developer")) | ||
timezone.set("-8") | ||
} | ||
developer { | ||
id.set("ChristianBecker") | ||
name.set("Christian Becker") | ||
email.set("[email protected]") | ||
roles.set(listOf("Developer")) | ||
timezone.set("+2") | ||
} | ||
developer { | ||
id.set("gtcompscientist") | ||
name.set("Charles Anderson") | ||
roles.set(listOf("Developer")) | ||
timezone.set("-8") | ||
} | ||
} | ||
|
||
tasks.withType<Upload> { | ||
repositories.forEach { | ||
(it as? PomFilterContainer)?.removeTestDependencies() | ||
scm { | ||
connection.set("scm:[email protected]:Triple-T/gradle-play-publisher.git") | ||
developerConnection.set("scm:[email protected]:Triple-T/gradle-play-publisher.git") | ||
url.set("https://github.com/Triple-T/gradle-play-publisher") | ||
} | ||
} | ||
} | ||
} | ||
|
@@ -64,8 +139,6 @@ tasks.withType<Test> { | |
// Our integration tests need a fully compiled jar | ||
dependsOn("assemble") | ||
|
||
// Those tests also need to know which version code was built | ||
project.property("VERSION_NAME")?.let { | ||
systemProperty("VERSION_NAME", it) | ||
} | ||
// Those tests also need to know which version was built | ||
systemProperty("VERSION_NAME", version) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
include(":plugin") | ||
|
||
enableFeaturePreview("STABLE_PUBLISHING") |