Split annotations to separate project

Use fabric mixin dependency
Enable preview features for annotation processor only
This commit is contained in:
Fury_Phoenix 2023-12-03 11:11:10 -08:00
parent 631913cbf9
commit 4645c26227
No known key found for this signature in database
GPG Key ID: 0595F98084987DB8
8 changed files with 25 additions and 3 deletions

View File

@ -5,12 +5,24 @@ plugins {
repositories {
mavenCentral()
maven {
name "Fabric"
url uri("https://maven.fabricmc.net")
}
}
dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'
implementation "net.fabricmc:sponge-mixin:0.12.5+"
implementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
implementation project(":annotations")
}
tasks.withType(JavaCompile) {
options.compilerArgs += '--enable-preview'
}
spotless {
@ -18,4 +30,4 @@ spotless {
removeUnusedImports()
}
}
version = '1.0'
version = '1.1.0'

6
annotations/build.gradle Normal file
View File

@ -0,0 +1,6 @@
plugins {
id 'modernfix.common-conventions'
id 'java-library'
}
version = '1.0.0'

View File

@ -16,6 +16,7 @@ dependencies {
parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
}
}
implementation project(":annotations")
annotationProcessor project(":annotation-processor")
}
@ -30,7 +31,9 @@ tasks {
}
tasks.withType(JavaCompile) {
options.fork = true
options.forkOptions.jvmArgs << '--enable-preview'
configure(options) {
options.compilerArgs << "-ArootProject.name=${rootProject.name}" << "-Aproject.name=${project.name}"
}
}
}

View File

@ -25,4 +25,4 @@ modmenu_version=1.16.23
spark_forge_version=3767277
spark_fabric_version=3337642
use_fabric_api_at_runtime=true
use_fabric_api_at_runtime=true

View File

@ -8,6 +8,7 @@ pluginManagement {
}
include("annotation-processor")
include("annotations")
include("test_agent")
include("common")