Skip to content

Commit

Permalink
Add missing POM metadata to Plugin (#171)
Browse files Browse the repository at this point in the history
Also fixes release workflow - there was file name issue
  • Loading branch information
timothyfroehlich committed Jul 3, 2023
1 parent b8fa851 commit 6ef9b63
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: designcompose_m2repo-${{ github.ref_name }}
name: designcompose_m2repo
path: build/designcompose_m2repo

upload-release:
Expand All @@ -71,7 +71,6 @@ jobs:
zip -q -r extended-layout-plugin-${{ github.ref_name }}.zip extended-layout-plugin/
zip -q -r auto-content-preview-widget-${{ github.ref_name }}.zip auto-content-preview-widget/

- name: Upload release artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 5 additions & 1 deletion dev-scripts/test-scripts/test-tutorial-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

GIT_ROOT=$(git rev-parse --show-toplevel)

Expand All @@ -23,4 +24,7 @@ cd "$GIT_ROOT" || exit
./gradlew publishAllPublicationsToLocalDirRepository

cd "$GIT_ROOT/reference-apps/tutorial" || exit
./gradlew --init-script ../local-design-compose-repo.init.gradle.kts check
./gradlew --init-script ../local-design-compose-repo.init.gradle.kts check
./gradlew --init-script ../local-design-compose-repo.init.gradle.kts tasks | grep setFigmaToken

echo "Test passed"
23 changes: 15 additions & 8 deletions plugins/gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,22 @@ gradlePlugin {
}

publishing {
publications.create<MavenPublication>("pluginMaven") {
pom {
basePom()
artifactId = "gradle-plugin"
name.set("Automotive Design for Compose Plugin")
description.set(
"Plugin that adds base configuration and assisting tasks to DesignCompose-enabled apps"
)
afterEvaluate {
// The java-gradle-plugin creates two publications, the "main" publication for
// the plugin's code and the "marker" publication that declares the plugin. Both need to
// have their POM metadata set.
// https://docs.gradle.org/current/userguide/java_gradle_plugin.html#maven_publish_plugin
val configuration: MavenPublication.() -> Unit = {
pom {
basePom()
name.set("Automotive Design for Compose Plugin")
description.set(
"Plugin that adds base configuration and assisting tasks to DesignCompose-enabled apps"
)
}
}
publications.named("pluginMaven", configuration)
publications.named("designcompose-gradle-pluginPluginMarkerMaven", configuration)
}
}

Expand Down

0 comments on commit 6ef9b63

Please sign in to comment.