Lombok compatibility
oneMillionWorlds edited this page Feb 19, 2024
·
1 revision
Typed Materials can be used in the same gradle project as lombok but not the same gradle module. This is because TypedMaterials needs to alter the java srcs and this upsets lombok.
If you want to use both in your project you'll want to have two (or more) modules; one for your assets (which has the TypedMaterials
plugin) and one with the main source of your application (which has the lombok plugin).
Such a multimodule project might be laid out like this
With the app's module taking the assets module as a dependency
app/build.gradle
plugins {
id 'application'
id 'java'
id "io.freefair.lombok" version "8.6"
}
dependencies {
implementation project(':assets')
//other dependencies as normal
}
assets/build.gradle
buildscript{
repositories {
mavenCentral()
}
dependencies {
classpath "com.onemillionworlds:typed-materials:1.0.0"
}
}
plugins {
id 'java'
}
apply plugin: 'com.onemillionworlds.typed-materials'
typedMaterials {
jmeMaterials()
localMaterialsSearch('com.onemillionworlds.starlight.materials')
}
settings.gradle
rootProject.name = 'MyProject'
include 'app'
include 'assets'