Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
CreatureChat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Public
CreatureChat
Commits
8243775b
Commit
8243775b
authored
Feb 15, 2019
by
UpcraftLP
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
automatically set mod version on export
parent
8c0584bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
build.gradle
build.gradle
+20
-2
fabric.mod.json
src/main/resources/fabric.mod.json
+1
-1
No files found.
build.gradle
View file @
8243775b
...
...
@@ -23,6 +23,24 @@ dependencies {
modCompile
"net.fabricmc:fabric:${project.fabric_version}"
}
processResources
{
// this will ensure that this task is re-run when there's a change
inputs
.
property
"version"
,
project
.
version
// replace stuff in fabric.mod.json, nothing else
from
(
sourceSets
.
main
.
resources
.
srcDirs
)
{
include
"fabric.mod.json"
// add mod metadata
expand
"version"
:
project
.
version
}
// copy everything else, thats not the mcmod.info
from
(
sourceSets
.
main
.
resources
.
srcDirs
)
{
exclude
"fabric.mod.json"
}
}
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
...
...
@@ -34,7 +52,7 @@ tasks.withType(JavaCompile) {
// if it is present.
// If you remove this task, sources will not be generated.
task
sourcesJar
(
type:
Jar
,
dependsOn:
classes
)
{
classifier
=
'sources'
classifier
=
"sources"
from
sourceSets
.
main
.
allSource
}
...
...
@@ -51,7 +69,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
if
(
JavaVersion
.
current
().
isJava8Compatible
())
{
allprojects
{
tasks
.
withType
(
Javadoc
)
{
options
.
addStringOption
(
'Xdoclint:none'
,
'-quiet'
)
options
.
addStringOption
(
"Xdoclint:none"
,
"-quiet"
)
}
}
}
...
...
src/main/resources/fabric.mod.json
View file @
8243775b
...
...
@@ -2,7 +2,7 @@
"id"
:
"modid"
,
"name"
:
"Example Mod"
,
"description"
:
"This is an example description! Tell everyone what your mod is about!"
,
"version"
:
"
1.0.0
"
,
"version"
:
"
${version}
"
,
"side"
:
"universal"
,
"initializers"
:
[
"net.fabricmc.example.ExampleMod"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment