generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from graalvm/tim/add-gradle-demos
Add gradle plugin to GraalPy demos
- Loading branch information
Showing
37 changed files
with
1,959 additions
and
47 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
53 changes: 53 additions & 0 deletions
53
graalpy/graalpy-freeze-dependencies-guide/build.gradle.kts
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,53 @@ | ||
plugins { | ||
application | ||
id("org.graalvm.python") version "24.1.1" | ||
} | ||
|
||
// To make the paths of this reference solution (without 'app' subdirectory for sources) | ||
// and "gradle init ..." based solution (with sources in 'app') the same for README.md | ||
layout.buildDirectory.set(layout.projectDirectory.dir("app/build")) | ||
|
||
if ("true".equals(System.getProperty("no.transitive.dependencies"))) { | ||
graalPy { | ||
packages = setOf("vaderSentiment==3.3.2") // ① | ||
} | ||
dependencies { | ||
implementation("org.graalvm.python:python:24.1.1") | ||
} | ||
} else { | ||
// The default profile shows the end result: all our transitive | ||
// dependencies are explicitly pinned to a specific version. | ||
graalPy { | ||
packages = setOf( | ||
"vaderSentiment==3.3.2", | ||
"certifi==2024.8.30", | ||
"charset-normalizer==3.1.0", | ||
"idna==3.8", | ||
"requests==2.32.3", | ||
"urllib3==2.2.2" | ||
) | ||
} | ||
dependencies { | ||
implementation("org.graalvm.python:python:24.1.1") | ||
} | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
maven { | ||
url = uri("https://repo.maven.apache.org/maven2/") | ||
} | ||
} | ||
|
||
// This dependency is necessary only for the example Java code, not for building and running pip freeze: | ||
dependencies.add("implementation", "org.graalvm.python:python-embedding:24.1.1") | ||
|
||
group = "org.example" | ||
version = "1.0-SNAPSHOT" | ||
description = "javase" | ||
java.sourceCompatibility = JavaVersion.VERSION_17 | ||
|
||
application { | ||
mainClass = "org.example.App" | ||
applicationDefaultJvmArgs = listOf("-Dgraalpy.resources=" + System.getProperty("graalpy.resources")) | ||
} |
Binary file added
BIN
+42.6 KB
graalpy/graalpy-freeze-dependencies-guide/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
graalpy/graalpy-freeze-dependencies-guide/gradle/wrapper/gradle-wrapper.properties
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,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.