-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修改发布仓库为 Gradle Plugin Portal 并修改代码包名 (#2)
- Loading branch information
ChenRenJie
authored
Oct 9, 2022
1 parent
5f98fc5
commit 24f42a0
Showing
17 changed files
with
93 additions
and
143 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
pushlish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Get version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} | ||
|
||
- name: Publish | ||
run: chmod +x ./gradlew && ./gradlew :plugin:publishPlugins -Pgradle.publish.version=$GRADLE_PUBLISH_VERSION -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET | ||
env: | ||
GRADLE_PUBLISH_VERSION: ${{steps.get_version.outputs.VERSION}} | ||
GRADLE_PUBLISH_KEY: ${{secrets.GRADLE_PUBLISH_KEY}} | ||
GRADLE_PUBLISH_SECRET: ${{secrets.GRADLE_PUBLISH_SECRET}} |
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,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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,14 +1,23 @@ | ||
plugins { | ||
id("java-gradle-plugin") | ||
id("org.jetbrains.kotlin.jvm") version "1.4.30" | ||
id("maven-publish") | ||
id("signing") | ||
id("com.gradle.plugin-publish") version "1.0.0" | ||
id("org.jetbrains.kotlin.jvm") version "1.7.0" | ||
} | ||
|
||
group = "io.github.knownitwhy" | ||
version = findProperty("gradle.publish.version") as String? ?: "snapshot" | ||
|
||
pluginBundle { | ||
website = "https://github.com/knownitwhy/gdr" | ||
vcsUrl = "https://github.com/knownitwhy/gdr.git" | ||
tags = listOf("dependency","dependencies") | ||
} | ||
|
||
gradlePlugin { | ||
val main by plugins.creating { | ||
id = "com.chrnie.gdr" | ||
implementationClass = "com.chrnie.gdr.GdrPlugin" | ||
plugins.create("gdr") { | ||
id = "io.github.knownitwhy.gdr" | ||
implementationClass = "io.github.knownitwhy.gdr.GdrPlugin" | ||
displayName = "Plugin for report dependencies of project, task, configuration" | ||
description = "A plugin that helps you analyze dependencies of project, task, configuration" | ||
} | ||
} | ||
|
||
|
@@ -18,70 +27,5 @@ repositories { | |
} | ||
|
||
dependencies { | ||
implementation("com.android.tools.build:gradle:3.4.0") | ||
} | ||
|
||
tasks.create("javadocJar", Jar::class.java) { | ||
archiveClassifier.set("javadoc") | ||
from("javadoc") | ||
} | ||
|
||
tasks.create("sourcesJar", Jar::class.java) { | ||
archiveClassifier.set("sources") | ||
from(sourceSets["main"].allSource) | ||
} | ||
|
||
publishing { | ||
publications { | ||
repositories { | ||
maven { | ||
name = "ossrh" | ||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = System.getenv("OSSRH_USERNAME") | ||
password = System.getenv("OSSRH_PASSWORD") | ||
} | ||
} | ||
} | ||
|
||
create<MavenPublication>("main") { | ||
groupId = "com.chrnie.gdr" | ||
artifactId = "plugin" | ||
version = System.getenv("VERSION")?:"0.0.2" | ||
|
||
from(components["java"]) | ||
artifact(tasks["javadocJar"]) | ||
artifact(tasks["sourcesJar"]) | ||
|
||
pom { | ||
name.set("gdr") | ||
description.set("Gradle 图形化依赖关系导出工具") | ||
url.set("https://github.com/renjie-c/gdr") | ||
|
||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
|
||
scm { | ||
url.set("https://github.com/renjie-c/gdr") | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("chrnie") | ||
name.set("ChenRenJie") | ||
email.set("[email protected]") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys(System.getenv("SIGNING_KEY"), System.getenv("SIGNING_PASSWORD")) | ||
sign(publishing.publications["main"]) | ||
implementation("com.android.tools.build:gradle:4.0.2") | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...ain/kotlin/com/chrnie/gdr/dot/Graphviz.kt → .../io/github/knownitwhy/gdr/dot/Graphviz.kt
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
2 changes: 1 addition & 1 deletion
2
.../kotlin/com/chrnie/gdr/ext/BaseVariant.kt → .../github/knownitwhy/gdr/ext/BaseVariant.kt
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
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,6 +1,6 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("com.chrnie.gdr") | ||
id("io.github.knownitwhy.gdr") | ||
} | ||
|
||
android { | ||
|
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,6 +1,6 @@ | ||
plugins { | ||
id("com.android.library") | ||
id("com.chrnie.gdr") | ||
id("io.github.knownitwhy.gdr") | ||
} | ||
|
||
android { | ||
|
Oops, something went wrong.