Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gradle.properties for gradle plugin version #71

Merged
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/update-smithy-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
id: fetch-latest
run: |
echo "latestSmithy=$( \
curl -sL https://api.github.com/repos/awslabs/smithy/releases/latest | \
curl -sL https://api.github.com/repos/smithy-lang/smithy/releases/latest | \
jq -r '.tag_name')" >> $GITHUB_OUTPUT
Comment on lines +18 to 19
Copy link
Contributor

Choose a reason for hiding this comment

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

Once we switch over the CLI release, we'll start including the VERSION file in the release assets. Instead of relying on the GH api, we can use the version-file too if we wanted. Occasionally, the api is finicky.


- name: Get current versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = "A package used to define an annotation trait"
plugins {
`java-library`
id("com.github.spotbugs").version("4.7.1")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
id("software.amazon.smithy.gradle.smithy-jar")
}

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
rootProject.name = "custom-annotation-trait"

pluginManagement {
val smithyGradleVersion: String by settings
plugins {
id("software.amazon.smithy.gradle.smithy-jar").version(smithyGradleVersion)
}

repositories {
mavenLocal()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Package for a custom Smithy string trait"
plugins {
`java-library`
id("com.github.spotbugs").version("4.7.3")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
id("software.amazon.smithy.gradle.smithy-jar")
}

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
rootProject.name = "custom-string-trait"

pluginManagement {
val smithyGradleVersion: String by settings
plugins {
id("software.amazon.smithy.gradle.smithy-jar").version(smithyGradleVersion)
}

repositories {
mavenLocal()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Custom Smithy structure trait with multiple inputs"
plugins {
`java-library`
id("com.github.spotbugs").version("4.7.3")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
id("software.amazon.smithy.gradle.smithy-jar")
}

java {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

pluginManagement {
val smithyGradleVersion: String by settings
plugins {
id("software.amazon.smithy.gradle.smithy-jar").version(smithyGradleVersion)
}

repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
}

rootProject.name = "custom-structure-trait"
rootProject.name = "custom-structure-trait"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
`java-library`
id("software.amazon.smithy.gradle.smithy-jar")
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
`java-library`
id("software.amazon.smithy.gradle.smithy-jar")
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
`java-library`
id("software.amazon.smithy.gradle.smithy-jar")
}

// The test project doesn't produce a JAR.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
description = "A package used to share a common linting configuration between smithy projects"

plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
`java-library`
id("software.amazon.smithy.gradle.smithy-jar")
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
rootProject.name = "common-linting-configuration"

pluginManagement {
val smithyGradleVersion: String by settings
plugins {
id("software.amazon.smithy.gradle.smithy-jar").version(smithyGradleVersion)
}

repositories {
mavenLocal()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Creates a custom Smithy model validator"
plugins {
`java-library`
id("com.github.spotbugs").version("4.7.3")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
id("software.amazon.smithy.gradle.smithy-jar")
}

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
rootProject.name = "custom-validator"

pluginManagement {
val smithyGradleVersion: String by settings
plugins {
id("software.amazon.smithy.gradle.smithy-jar").version(smithyGradleVersion)
}

repositories {
mavenLocal()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
id("software.amazon.smithy.gradle.smithy-jar")
}

// The test project doesn't produce a JAR.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
`java-library`
id("software.amazon.smithy.gradle.smithy-jar")
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
`java-library`
id("software.amazon.smithy.gradle.smithy-jar")
}


Expand Down
4 changes: 2 additions & 2 deletions quickstart-examples/quickstart-gradle/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
`java-library`
id("software.amazon.smithy.gradle.smithy-jar")
}

repositories {
Expand Down
1 change: 1 addition & 0 deletions quickstart-examples/quickstart-gradle/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
smithyVersion=1.44.0
smithyGradleVersion=0.10.0
7 changes: 6 additions & 1 deletion quickstart-examples/quickstart-gradle/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

pluginManagement {
val smithyGradleVersion: String by settings
plugins {
id("software.amazon.smithy.gradle.smithy-jar").version(smithyGradleVersion)
}

repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
}

rootProject.name = "quickstart-gradle"
rootProject.name = "quickstart-gradle"
6 changes: 6 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

pluginManagement {
val smithyGradleVersion: String by settings
plugins {
id("software.amazon.smithy.gradle.smithy-jar").version(smithyGradleVersion)
id("software.amazon.smithy.gradle.smithy-base").version(smithyGradleVersion)
}

repositories {
mavenLocal()
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion shared-model-examples/common-shapes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = "A package used to share common shapes between smithy projects"

plugins {
`java-library`
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
id("software.amazon.smithy.gradle.smithy-jar")
}

repositories {
Expand Down
6 changes: 6 additions & 0 deletions shared-model-examples/common-shapes/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
rootProject.name = "common-shapes"

pluginManagement {
val smithyGradleVersion: String by settings

plugins {
id("software.amazon.smithy.gradle.smithy-jar").version(smithyGradleVersion)
}

repositories {
mavenLocal()
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions shared-model-examples/integ/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-library")
id("software.amazon.smithy.gradle.smithy-jar").version("0.10.0")
`java-library`
id("software.amazon.smithy.gradle.smithy-jar")
}

// The test project doesn't produce a JAR.
Expand Down
Loading