-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update scala version, and buildscript #23
base: scala3
Are you sure you want to change the base?
Changes from 10 commits
ce71e88
845125e
40e1444
5b462fc
f048895
1774b97
47d74ae
f02ae6e
d112a24
f7ba0d0
b9a5c25
b1391e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,26 @@ | ||
plugins { | ||
id "java-library" | ||
id "scala" | ||
id "maven-publish" | ||
id 'fabric-loom' version '0.10.30' | ||
id "com.matthewprenger.cursegradle" version "1.4.0" | ||
id 'java-library' | ||
id 'scala' | ||
id 'maven-publish' | ||
id 'fabric-loom' version '1.5-SNAPSHOT' | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
archivesBaseName = project.archives_base_name | ||
group = project.maven_group | ||
|
||
version = mod_version | ||
def ENV = System.getenv() | ||
version = version + "+scala." + project.scala_version + (ENV.GITHUB_ACTIONS ? "" : ".local") | ||
version = mod_version + "+scala." + project.scala_version + (System.getenv('GITHUB_ACTIONS') ? "" : ".local") | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" | ||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" | ||
|
||
include(api("org.scala-lang:scala3-library_3:${project.scala_version}")) | ||
// Depended on by scala3 | ||
include(api("org.scala-lang:scala-library:2.13.6")) | ||
// Scala Dependencies | ||
implementation "org.scala-lang:scala3-library_3:${project.scala_version}" | ||
implementation "org.scala-lang:scala-reflect:${project.scala_reflect_version}" | ||
implementation "org.scala-lang.modules:scala-xml_3:${project.scala_xml_version}"// might be unnecessary but wtv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this needed or not? I dont see why it would be, why also add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adding scala reflect can add more complex coding practice when using scala. and the xml idk why i added that i think it was just late at night so i wasnt thinking. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, thanks I have removed them. Its much easier to add them later if needed. |
||
} | ||
|
||
processResources { | ||
|
@@ -39,49 +36,22 @@ java { | |
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
repositories { | ||
repositories { | ||
if (ENV.MAVEN_URL) { | ||
maven { | ||
url ENV.MAVEN_URL | ||
credentials { | ||
username ENV.MAVEN_USERNAME | ||
password ENV.MAVEN_PASSWORD | ||
} | ||
} | ||
} | ||
repositories { | ||
if (System.getenv('MAVEN_URL')) { | ||
maven { | ||
url System.getenv('MAVEN_URL') | ||
credentials { | ||
username System.getenv('MAVEN_USERNAME') | ||
password System.getenv('MAVEN_PASSWORD') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
curseforge { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ill add this back. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh i didnt know fabric was on curseforge anymore There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its fine, I would have also removed this plugin as I have my own. Ill sort this out after merging. |
||
if (ENV.CURSEFORGE_API_KEY) { | ||
apiKey = ENV.CURSEFORGE_API_KEY | ||
} | ||
|
||
project { | ||
id = '309275' | ||
changelog = 'A changelog can be found at https://github.com/FabricMC/fabric-language-scala/commits/master' | ||
releaseType = 'release' | ||
addGameVersion '1.17.1' | ||
addGameVersion '1.16.5' | ||
addGameVersion '1.15.2' | ||
addGameVersion '1.14.4' | ||
addGameVersion "Fabric" | ||
|
||
mainArtifact(file("${project.buildDir}/libs/${base.archivesBaseName}-${version}.jar")) { | ||
displayName = "Fabric Language Scala $version" | ||
} | ||
} | ||
|
||
options { | ||
forgeGradleIntegration = false | ||
} | ||
} | ||
|
||
// A task to ensure that the version being released has not already been released. | ||
|
@@ -95,6 +65,3 @@ task checkVersion { | |
} | ||
} | ||
} | ||
|
||
publish.mustRunAfter checkVersion | ||
project.tasks.curseforge.mustRunAfter checkVersion |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-rc-1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
zipStorePath=wrapper/dists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it seems right? I don't think this is the correct nested-jar.
After I testing about it, I can't find any bundled jar in
fabric-language-scala
.@modmuss50
Maybe correcting it into
like
fabric-language-kotlin
will be ok?