gradle-native
gradle-native copied to clipboard
Remove internal references from s
While working on a header artifact transform problem with @melix on this mvce:
- https://github.com/ncimino/transform-extract-mvce/pull/1
He identified that I should not have been using the internal packages e.g.
import org.gradle.api.internal.artifacts.ArtifactAttributes;
import org.gradle.api.internal.artifacts.transform.UnzipTransform;
This code originated from the native-sample for cmake.
The ArtifactAttributes references can be changed to strings as @melix suggested. The UnzipTransform should be implemented locally.
We just need to clean this sample project so that it isn't referencing internal APIs anymore as I don't think they are needed anymore. There are more than what was identified above, in just this file these are the internal APIs being referenced here:
import org.gradle.api.internal.CollectionCallbackActionDecorator;
import org.gradle.api.internal.artifacts.ArtifactAttributes;
import org.gradle.api.internal.artifacts.DefaultModuleVersionIdentifier;
import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact;
import org.gradle.api.internal.artifacts.transform.UnzipTransform;
import org.gradle.api.internal.attributes.AttributeContainerInternal;
import org.gradle.api.internal.attributes.ImmutableAttributesFactory;
import org.gradle.api.internal.component.SoftwareComponentInternal;
import org.gradle.api.internal.component.UsageContext;
I presume we should try to remove all of them.