2016-08-16 22:29:10 +00:00
|
|
|
/*
|
|
|
|
* This file is part of fabric-loom, licensed under the MIT License (MIT).
|
|
|
|
*
|
2018-10-27 14:14:05 +00:00
|
|
|
* Copyright (c) 2016, 2017, 2018 FabricMC
|
2016-08-16 22:29:10 +00:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
|
|
* copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2016-08-16 23:30:48 +00:00
|
|
|
package net.fabricmc.loom;
|
2016-08-15 10:22:14 +00:00
|
|
|
|
2019-11-02 20:23:27 +00:00
|
|
|
import java.io.File;
|
|
|
|
import java.nio.file.Path;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Objects;
|
|
|
|
import java.util.function.BiPredicate;
|
|
|
|
import java.util.function.Function;
|
|
|
|
import java.util.function.Supplier;
|
|
|
|
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
2018-12-22 09:31:10 +00:00
|
|
|
import com.google.gson.JsonObject;
|
2018-12-22 13:37:16 +00:00
|
|
|
import org.cadixdev.lorenz.MappingSet;
|
2019-05-28 07:23:19 +00:00
|
|
|
import org.cadixdev.mercury.Mercury;
|
2016-08-25 11:42:23 +00:00
|
|
|
import org.gradle.api.Project;
|
2018-12-30 11:03:25 +00:00
|
|
|
import org.gradle.api.artifacts.Configuration;
|
2018-12-15 13:33:25 +00:00
|
|
|
import org.gradle.api.artifacts.Dependency;
|
2019-12-29 17:29:19 +00:00
|
|
|
import org.gradle.api.plugins.BasePluginConvention;
|
2016-08-25 11:42:23 +00:00
|
|
|
|
0.2.7 refactors (#178)
* Rough work on project based jars, skeleton for AccessEscalators?
* First working draft
* Minor changes
* Add support for mutable, better error checking when parsing file.
Code cleanup
Remap if needed when reading
* Fix inner classes and genSources
* Fix CME
* Caching, only regen jar when input changes
* Some work, untested
* Fix writing, fix checkstyle issues
* More fixes
* Move jars into a maven file structure, cleans up the file structure, and will benefit idea 2020
Add some basic validation to the AccessWidenerRemapper, will present any issues with the mappings when building (May need a way to disable?)
+ Some bugs fixes
* Fix issues with source jars in idea 2020, should be backwards compatible with 2019
* Move to lorenz-tiny
* Build fix + small cleanup
* Remove accesswidener's for now
* Update dev launch injector, should fix all issues with spaces in the path.
2020-03-06 11:15:34 +00:00
|
|
|
import net.fabricmc.loom.processors.JarProcessorManager;
|
2019-11-02 20:23:27 +00:00
|
|
|
import net.fabricmc.loom.providers.MappingsProvider;
|
|
|
|
import net.fabricmc.loom.providers.MinecraftMappedProvider;
|
|
|
|
import net.fabricmc.loom.providers.MinecraftProvider;
|
|
|
|
import net.fabricmc.loom.util.LoomDependencyManager;
|
2016-08-25 11:42:23 +00:00
|
|
|
|
2016-08-16 18:19:05 +00:00
|
|
|
public class LoomGradleExtension {
|
2016-08-17 16:38:54 +00:00
|
|
|
public String runDir = "run";
|
2018-10-22 18:46:42 +00:00
|
|
|
public String refmapName;
|
2018-12-22 09:31:10 +00:00
|
|
|
public String loaderLaunchMethod;
|
2018-11-05 20:33:57 +00:00
|
|
|
public boolean remapMod = true;
|
2018-12-19 23:05:19 +00:00
|
|
|
public boolean autoGenIDERuns = true;
|
2019-04-08 09:50:30 +00:00
|
|
|
public boolean extractJars = false;
|
2019-08-15 16:45:08 +00:00
|
|
|
public String customManifest = null;
|
0.2.7 refactors (#178)
* Rough work on project based jars, skeleton for AccessEscalators?
* First working draft
* Minor changes
* Add support for mutable, better error checking when parsing file.
Code cleanup
Remap if needed when reading
* Fix inner classes and genSources
* Fix CME
* Caching, only regen jar when input changes
* Some work, untested
* Fix writing, fix checkstyle issues
* More fixes
* Move jars into a maven file structure, cleans up the file structure, and will benefit idea 2020
Add some basic validation to the AccessWidenerRemapper, will present any issues with the mappings when building (May need a way to disable?)
+ Some bugs fixes
* Fix issues with source jars in idea 2020, should be backwards compatible with 2019
* Move to lorenz-tiny
* Build fix + small cleanup
* Remove accesswidener's for now
* Update dev launch injector, should fix all issues with spaces in the path.
2020-03-06 11:15:34 +00:00
|
|
|
public File accessWidener = null;
|
2016-08-25 11:42:23 +00:00
|
|
|
|
2019-05-10 22:53:50 +00:00
|
|
|
private List<Path> unmappedModsBuilt = new ArrayList<>();
|
2018-12-12 06:10:30 +00:00
|
|
|
|
2016-08-25 11:42:23 +00:00
|
|
|
//Not to be set in the build.gradle
|
2018-11-04 00:27:55 +00:00
|
|
|
private Project project;
|
2018-11-04 21:28:46 +00:00
|
|
|
private LoomDependencyManager dependencyManager;
|
0.2.7 refactors (#178)
* Rough work on project based jars, skeleton for AccessEscalators?
* First working draft
* Minor changes
* Add support for mutable, better error checking when parsing file.
Code cleanup
Remap if needed when reading
* Fix inner classes and genSources
* Fix CME
* Caching, only regen jar when input changes
* Some work, untested
* Fix writing, fix checkstyle issues
* More fixes
* Move jars into a maven file structure, cleans up the file structure, and will benefit idea 2020
Add some basic validation to the AccessWidenerRemapper, will present any issues with the mappings when building (May need a way to disable?)
+ Some bugs fixes
* Fix issues with source jars in idea 2020, should be backwards compatible with 2019
* Move to lorenz-tiny
* Build fix + small cleanup
* Remove accesswidener's for now
* Update dev launch injector, should fix all issues with spaces in the path.
2020-03-06 11:15:34 +00:00
|
|
|
private JarProcessorManager jarProcessorManager;
|
2018-12-22 09:31:10 +00:00
|
|
|
private JsonObject installerJson;
|
2018-12-22 13:37:16 +00:00
|
|
|
private MappingSet[] srcMappingCache = new MappingSet[2];
|
2019-05-28 07:23:19 +00:00
|
|
|
private Mercury[] srcMercuryCache = new Mercury[2];
|
2018-12-22 13:37:16 +00:00
|
|
|
|
|
|
|
public MappingSet getOrCreateSrcMappingCache(int id, Supplier<MappingSet> factory) {
|
|
|
|
return srcMappingCache[id] != null ? srcMappingCache[id] : (srcMappingCache[id] = factory.get());
|
|
|
|
}
|
2018-11-04 00:27:55 +00:00
|
|
|
|
2019-05-28 07:23:19 +00:00
|
|
|
public Mercury getOrCreateSrcMercuryCache(int id, Supplier<Mercury> factory) {
|
|
|
|
return srcMercuryCache[id] != null ? srcMercuryCache[id] : (srcMercuryCache[id] = factory.get());
|
|
|
|
}
|
|
|
|
|
2018-11-04 00:27:55 +00:00
|
|
|
public LoomGradleExtension(Project project) {
|
|
|
|
this.project = project;
|
|
|
|
}
|
2016-08-25 11:42:23 +00:00
|
|
|
|
2019-05-10 22:53:50 +00:00
|
|
|
public void addUnmappedMod(Path file) {
|
2018-12-12 06:10:30 +00:00
|
|
|
unmappedModsBuilt.add(file);
|
|
|
|
}
|
|
|
|
|
2019-05-10 22:53:50 +00:00
|
|
|
public List<Path> getUnmappedMods() {
|
2018-12-12 06:10:30 +00:00
|
|
|
return Collections.unmodifiableList(unmappedModsBuilt);
|
|
|
|
}
|
|
|
|
|
2019-11-12 18:46:57 +00:00
|
|
|
public void setInstallerJson(JsonObject object) {
|
|
|
|
this.installerJson = object;
|
2019-11-02 20:23:27 +00:00
|
|
|
}
|
2018-12-22 09:31:10 +00:00
|
|
|
|
2019-11-02 20:23:27 +00:00
|
|
|
public JsonObject getInstallerJson() {
|
|
|
|
return installerJson;
|
|
|
|
}
|
2018-12-22 09:31:10 +00:00
|
|
|
|
2018-05-13 01:43:40 +00:00
|
|
|
public File getUserCache() {
|
2018-10-22 18:25:18 +00:00
|
|
|
File userCache = new File(project.getGradle().getGradleUserHomeDir(), "caches" + File.separator + "fabric-loom");
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2016-08-25 11:42:23 +00:00
|
|
|
if (!userCache.exists()) {
|
|
|
|
userCache.mkdirs();
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2016-08-25 11:42:23 +00:00
|
|
|
return userCache;
|
|
|
|
}
|
2017-02-09 18:21:42 +00:00
|
|
|
|
2019-04-21 12:39:51 +00:00
|
|
|
public File getRootProjectPersistentCache() {
|
2019-06-24 10:23:28 +00:00
|
|
|
File projectCache = new File(project.getRootProject().file(".gradle"), "loom-cache");
|
2019-11-02 20:23:27 +00:00
|
|
|
|
|
|
|
if (!projectCache.exists()) {
|
2019-04-21 12:39:51 +00:00
|
|
|
projectCache.mkdirs();
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-21 12:39:51 +00:00
|
|
|
return projectCache;
|
|
|
|
}
|
|
|
|
|
0.2.7 refactors (#178)
* Rough work on project based jars, skeleton for AccessEscalators?
* First working draft
* Minor changes
* Add support for mutable, better error checking when parsing file.
Code cleanup
Remap if needed when reading
* Fix inner classes and genSources
* Fix CME
* Caching, only regen jar when input changes
* Some work, untested
* Fix writing, fix checkstyle issues
* More fixes
* Move jars into a maven file structure, cleans up the file structure, and will benefit idea 2020
Add some basic validation to the AccessWidenerRemapper, will present any issues with the mappings when building (May need a way to disable?)
+ Some bugs fixes
* Fix issues with source jars in idea 2020, should be backwards compatible with 2019
* Move to lorenz-tiny
* Build fix + small cleanup
* Remove accesswidener's for now
* Update dev launch injector, should fix all issues with spaces in the path.
2020-03-06 11:15:34 +00:00
|
|
|
public File getProjectPersistentCache() {
|
|
|
|
File projectCache = new File(project.file(".gradle"), "loom-cache");
|
|
|
|
|
|
|
|
if (!projectCache.exists()) {
|
|
|
|
projectCache.mkdirs();
|
|
|
|
}
|
|
|
|
|
|
|
|
return projectCache;
|
|
|
|
}
|
|
|
|
|
2019-04-21 09:18:45 +00:00
|
|
|
public File getRootProjectBuildCache() {
|
|
|
|
File projectCache = new File(project.getRootProject().getBuildDir(), "loom-cache");
|
2019-11-02 20:23:27 +00:00
|
|
|
|
|
|
|
if (!projectCache.exists()) {
|
2019-04-21 09:18:45 +00:00
|
|
|
projectCache.mkdirs();
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-21 09:18:45 +00:00
|
|
|
return projectCache;
|
|
|
|
}
|
|
|
|
|
|
|
|
public File getProjectBuildCache() {
|
|
|
|
File projectCache = new File(project.getBuildDir(), "loom-cache");
|
2019-11-02 20:23:27 +00:00
|
|
|
|
|
|
|
if (!projectCache.exists()) {
|
2018-12-10 14:28:58 +00:00
|
|
|
projectCache.mkdirs();
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2018-12-10 14:28:58 +00:00
|
|
|
return projectCache;
|
|
|
|
}
|
|
|
|
|
2018-12-22 13:44:34 +00:00
|
|
|
public File getRemappedModCache() {
|
2019-04-21 12:39:51 +00:00
|
|
|
File remappedModCache = new File(getRootProjectPersistentCache(), "remapped_mods");
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2018-12-22 13:44:34 +00:00
|
|
|
if (!remappedModCache.exists()) {
|
|
|
|
remappedModCache.mkdir();
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2018-12-22 13:44:34 +00:00
|
|
|
return remappedModCache;
|
|
|
|
}
|
|
|
|
|
2019-04-07 19:31:25 +00:00
|
|
|
public File getNestedModCache() {
|
2019-04-21 12:39:51 +00:00
|
|
|
File nestedModCache = new File(getRootProjectPersistentCache(), "nested_mods");
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-07 19:31:25 +00:00
|
|
|
if (!nestedModCache.exists()) {
|
|
|
|
nestedModCache.mkdir();
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-07 19:31:25 +00:00
|
|
|
return nestedModCache;
|
|
|
|
}
|
|
|
|
|
2019-11-02 20:23:27 +00:00
|
|
|
public File getNativesJarStore() {
|
2019-10-22 19:04:38 +00:00
|
|
|
File natives = new File(getUserCache(), "natives/jars");
|
2019-11-02 20:23:27 +00:00
|
|
|
|
|
|
|
if (!natives.exists()) {
|
2019-10-22 19:04:38 +00:00
|
|
|
natives.mkdirs();
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-10-22 19:04:38 +00:00
|
|
|
return natives;
|
|
|
|
}
|
|
|
|
|
2019-11-02 20:23:27 +00:00
|
|
|
public File getNativesDirectory() {
|
0.2.7 refactors (#178)
* Rough work on project based jars, skeleton for AccessEscalators?
* First working draft
* Minor changes
* Add support for mutable, better error checking when parsing file.
Code cleanup
Remap if needed when reading
* Fix inner classes and genSources
* Fix CME
* Caching, only regen jar when input changes
* Some work, untested
* Fix writing, fix checkstyle issues
* More fixes
* Move jars into a maven file structure, cleans up the file structure, and will benefit idea 2020
Add some basic validation to the AccessWidenerRemapper, will present any issues with the mappings when building (May need a way to disable?)
+ Some bugs fixes
* Fix issues with source jars in idea 2020, should be backwards compatible with 2019
* Move to lorenz-tiny
* Build fix + small cleanup
* Remove accesswidener's for now
* Update dev launch injector, should fix all issues with spaces in the path.
2020-03-06 11:15:34 +00:00
|
|
|
File natives = new File(getUserCache(), "natives/" + getMinecraftProvider().getMinecraftVersion());
|
2019-11-02 20:23:27 +00:00
|
|
|
|
|
|
|
if (!natives.exists()) {
|
2019-10-22 19:04:38 +00:00
|
|
|
natives.mkdirs();
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-10-22 19:04:38 +00:00
|
|
|
return natives;
|
|
|
|
}
|
|
|
|
|
2019-11-11 18:52:19 +00:00
|
|
|
public File getDevLauncherConfig() {
|
|
|
|
return new File(getRootProjectPersistentCache(), "launch.cfg");
|
|
|
|
}
|
|
|
|
|
2018-12-15 13:33:25 +00:00
|
|
|
@Nullable
|
2019-05-27 20:14:35 +00:00
|
|
|
private static Dependency findDependency(Project p, Collection<Configuration> configs, BiPredicate<String, String> groupNameFilter) {
|
2019-04-27 20:31:50 +00:00
|
|
|
for (Configuration config : configs) {
|
2019-04-29 22:43:26 +00:00
|
|
|
for (Dependency dependency : config.getDependencies()) {
|
|
|
|
String group = dependency.getGroup();
|
|
|
|
String name = dependency.getName();
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-29 22:43:26 +00:00
|
|
|
if (groupNameFilter.test(group, name)) {
|
2019-05-27 20:14:35 +00:00
|
|
|
p.getLogger().debug("Loom findDependency found: " + group + ":" + name + ":" + dependency.getVersion());
|
2019-04-29 22:43:26 +00:00
|
|
|
return dependency;
|
2018-12-30 11:03:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nullable
|
2019-04-29 22:43:26 +00:00
|
|
|
private <T> T recurseProjects(Function<Project, T> projectTFunction) {
|
|
|
|
Project p = this.project;
|
|
|
|
T result;
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-29 22:43:26 +00:00
|
|
|
while (!AbstractPlugin.isRootProject(p)) {
|
|
|
|
if ((result = projectTFunction.apply(p)) != null) {
|
|
|
|
return result;
|
2019-04-15 08:12:48 +00:00
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-29 22:43:26 +00:00
|
|
|
p = p.getRootProject();
|
2019-04-14 18:08:26 +00:00
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-29 22:43:26 +00:00
|
|
|
result = projectTFunction.apply(p);
|
|
|
|
return result;
|
2018-12-30 11:03:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Nullable
|
2019-04-29 22:43:26 +00:00
|
|
|
private Dependency getMixinDependency() {
|
|
|
|
return recurseProjects((p) -> {
|
|
|
|
List<Configuration> configs = new ArrayList<>();
|
2019-05-27 20:14:35 +00:00
|
|
|
// check compile classpath first
|
2019-10-22 19:29:25 +00:00
|
|
|
Configuration possibleCompileClasspath = p.getConfigurations().findByName("compileClasspath");
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-10-22 19:29:25 +00:00
|
|
|
if (possibleCompileClasspath != null) {
|
|
|
|
configs.add(possibleCompileClasspath);
|
|
|
|
}
|
2019-11-02 20:23:27 +00:00
|
|
|
|
2019-04-29 22:43:26 +00:00
|
|
|
// failing that, buildscript
|
|
|
|
configs.addAll(p.getBuildscript().getConfigurations());
|
|
|
|
|
2019-05-27 20:14:35 +00:00
|
|
|
return findDependency(p, configs, (group, name) -> {
|
2019-04-29 22:43:26 +00:00
|
|
|
if (name.equalsIgnoreCase("mixin") && group.equalsIgnoreCase("org.spongepowered")) {
|
|
|
|
return true;
|
|
|
|
}
|
2018-12-30 11:03:25 +00:00
|
|
|
|
2019-04-29 22:43:26 +00:00
|
|
|
if (name.equalsIgnoreCase("sponge-mixin") && group.equalsIgnoreCase("net.fabricmc")) {
|
|
|
|
return true;
|
|
|
|
}
|
2018-12-30 11:03:25 +00:00
|
|
|
|
2019-04-29 22:43:26 +00:00
|
|
|
return false;
|
|
|
|
});
|
2018-12-30 11:03:25 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nullable
|
|
|
|
public String getMixinJsonVersion() {
|
2019-04-29 22:43:26 +00:00
|
|
|
Dependency dependency = getMixinDependency();
|
2018-12-30 11:03:25 +00:00
|
|
|
|
2019-04-29 22:43:26 +00:00
|
|
|
if (dependency != null) {
|
2018-12-30 11:03:25 +00:00
|
|
|
if (dependency.getGroup().equalsIgnoreCase("net.fabricmc")) {
|
2018-12-15 13:33:25 +00:00
|
|
|
if (Objects.requireNonNull(dependency.getVersion()).split("\\.").length >= 4) {
|
|
|
|
return dependency.getVersion().substring(0, dependency.getVersion().lastIndexOf('.')) + "-SNAPSHOT";
|
|
|
|
}
|
|
|
|
}
|
2018-12-30 11:03:25 +00:00
|
|
|
|
|
|
|
return dependency.getVersion();
|
2018-12-15 13:33:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2018-12-22 09:31:10 +00:00
|
|
|
public String getLoaderLaunchMethod() {
|
|
|
|
return loaderLaunchMethod != null ? loaderLaunchMethod : "";
|
|
|
|
}
|
|
|
|
|
2018-11-04 21:28:46 +00:00
|
|
|
public LoomDependencyManager getDependencyManager() {
|
|
|
|
return dependencyManager;
|
|
|
|
}
|
|
|
|
|
2019-11-02 20:23:27 +00:00
|
|
|
public MinecraftProvider getMinecraftProvider() {
|
2018-11-04 21:28:46 +00:00
|
|
|
return getDependencyManager().getProvider(MinecraftProvider.class);
|
|
|
|
}
|
|
|
|
|
2019-11-02 20:23:27 +00:00
|
|
|
public MinecraftMappedProvider getMinecraftMappedProvider() {
|
2018-12-09 21:22:35 +00:00
|
|
|
return getMappingsProvider().mappedProvider;
|
2018-11-21 08:03:56 +00:00
|
|
|
}
|
|
|
|
|
2019-11-02 20:23:27 +00:00
|
|
|
public MappingsProvider getMappingsProvider() {
|
2018-12-09 21:22:35 +00:00
|
|
|
return getDependencyManager().getProvider(MappingsProvider.class);
|
2018-11-05 15:54:14 +00:00
|
|
|
}
|
|
|
|
|
2018-11-04 21:28:46 +00:00
|
|
|
public void setDependencyManager(LoomDependencyManager dependencyManager) {
|
|
|
|
this.dependencyManager = dependencyManager;
|
2017-02-09 18:21:42 +00:00
|
|
|
}
|
2018-12-30 11:04:53 +00:00
|
|
|
|
0.2.7 refactors (#178)
* Rough work on project based jars, skeleton for AccessEscalators?
* First working draft
* Minor changes
* Add support for mutable, better error checking when parsing file.
Code cleanup
Remap if needed when reading
* Fix inner classes and genSources
* Fix CME
* Caching, only regen jar when input changes
* Some work, untested
* Fix writing, fix checkstyle issues
* More fixes
* Move jars into a maven file structure, cleans up the file structure, and will benefit idea 2020
Add some basic validation to the AccessWidenerRemapper, will present any issues with the mappings when building (May need a way to disable?)
+ Some bugs fixes
* Fix issues with source jars in idea 2020, should be backwards compatible with 2019
* Move to lorenz-tiny
* Build fix + small cleanup
* Remove accesswidener's for now
* Update dev launch injector, should fix all issues with spaces in the path.
2020-03-06 11:15:34 +00:00
|
|
|
public JarProcessorManager getJarProcessorManager() {
|
|
|
|
return jarProcessorManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setJarProcessorManager(JarProcessorManager jarProcessorManager) {
|
|
|
|
this.jarProcessorManager = jarProcessorManager;
|
|
|
|
}
|
|
|
|
|
2018-12-30 11:04:53 +00:00
|
|
|
public String getRefmapName() {
|
2019-11-02 20:23:27 +00:00
|
|
|
if (refmapName == null || refmapName.isEmpty()) {
|
2019-12-29 17:29:19 +00:00
|
|
|
String defaultRefmapName = project.getConvention().getPlugin(BasePluginConvention.class).getArchivesBaseName() + "-refmap.json";
|
|
|
|
project.getLogger().warn("Could not find refmap definition, will be using default name: " + defaultRefmapName);
|
|
|
|
refmapName = defaultRefmapName;
|
2018-12-30 11:04:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return refmapName;
|
|
|
|
}
|
2019-12-13 18:24:01 +00:00
|
|
|
|
|
|
|
public boolean ideSync() {
|
|
|
|
return Boolean.parseBoolean(System.getProperty("idea.sync.active", "false"));
|
|
|
|
}
|
2016-08-15 10:22:14 +00:00
|
|
|
}
|