-
Notifications
You must be signed in to change notification settings - Fork 110
Weaving LibGDX
Adrian Papari edited this page Mar 9, 2016
·
24 revisions
Make weaving part of the gradlew desktop:dist
target:
Add artemis-odb gradle plugin to buildscript dependencies.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "net.onedaybeard.artemis:artemis-odb-gradle-plugin:1.4.0"
}
}
Replace the 'dist' task in desktop. This will explode to a folder, weave everything in that folder, then create the jar.
apply plugin: "artemis"
..
project.ext.weaveDir = new File("$buildDir/explodedForWeave")
..
// Prepare folder with all dependencies exploded.
task explodeForWeave(type: Sync, dependsOn: classes) {
into project.weaveDir
from files(sourceSets.main.output.classesDir)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir)
}
// Apply weaving on dependency folder.
weave {
dependsOn explodeForWeave
enableArtemisPlugin = true
enablePooledWeaving = true
ideFriendlyPacking = true
optimizeEntitySystems = true
classesDir = project.weaveDir
}
// package woven classes into jar.
task dist(type: Jar, dependsOn: weave) {
from project.weaveDir
manifest {
attributes 'Main-Class': project.mainClassName
}
}
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference