Skip to content

Commit a06bc3d

Browse files
committed
more src/api fixes
1 parent cde73cd commit a06bc3d

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

build.gradle

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ jar {
688688
from sourceSets.api.output
689689
dependsOn apiClasses
690690

691-
include "${apiPackage}/**"
691+
include "${modGroupPath}/**"
692692
include "assets/**"
693693
include "mcmod.info"
694694
include "pack.mcmeta"
@@ -712,12 +712,21 @@ if (separateRunDirectories.toBoolean()) {
712712
// Create API library jar
713713
tasks.register('apiJar', Jar) {
714714
archiveClassifier.set 'api'
715-
from(sourceSets.main.java) {
716-
include "${modGroupPath}/${apiPackagePath}/**"
717-
}
715+
if (useSrcApiPath) {
716+
from(sourceSets.api.java) {
717+
include "${modGroupPath}/${apiPackagePath}/**"
718+
}
719+
from(sourceSets.api.output) {
720+
include "${modGroupPath}/${apiPackagePath}/**"
721+
}
722+
} else {
723+
from(sourceSets.main.java) {
724+
include "${modGroupPath}/${apiPackagePath}/**"
725+
}
718726

719-
from(sourceSets.main.output) {
720-
include "${modGroupPath}/${apiPackagePath}/**"
727+
from(sourceSets.main.output) {
728+
include "${modGroupPath}/${apiPackagePath}/**"
729+
}
721730
}
722731
}
723732

0 commit comments

Comments
 (0)