Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: directly expose static final String fields / remove getters #706

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import org.gradle.jvm.toolchain.JavaToolchainService

class ShadowApplicationPlugin implements Plugin<Project> {

static final String SHADOW_RUN_TASK_NAME = 'runShadow'
static final String SHADOW_SCRIPTS_TASK_NAME = 'startShadowScripts'
static final String SHADOW_INSTALL_TASK_NAME = 'installShadowDist'
public static final String SHADOW_RUN_TASK_NAME = 'runShadow'
public static final String SHADOW_SCRIPTS_TASK_NAME = 'startShadowScripts'
public static final String SHADOW_INSTALL_TASK_NAME = 'installShadowDist'

private Project project
private ApplicationPluginConvention pluginConvention
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import org.gradle.util.GradleVersion

class ShadowBasePlugin implements Plugin<Project> {

static final String EXTENSION_NAME = 'shadow'
static final String CONFIGURATION_NAME = 'shadow'
public static final String EXTENSION_NAME = 'shadow'
public static final String CONFIGURATION_NAME = 'shadow'

@Override
void apply(Project project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import javax.inject.Inject

class ShadowJavaPlugin implements Plugin<Project> {

static final String SHADOW_JAR_TASK_NAME = 'shadowJar'
static final String SHADOW_GROUP = 'Shadow'
public static final String SHADOW_JAR_TASK_NAME = 'shadowJar'
public static final String SHADOW_GROUP = 'Shadow'

private final ProjectConfigurationActionContainer configurationActionContainer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import org.gradle.api.tasks.TaskAction

class KnowsTask extends DefaultTask {

static final String NAME = "knows"
static final String DESC = "Do you know who knows?"
public static final String NAME = "knows"
public static final String DESC = "Do you know who knows?"

@TaskAction
def knows() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import org.gradle.api.file.FileTreeElement
class ComponentsXmlResourceTransformer implements Transformer {
private Map<String, Xpp3Dom> components = new LinkedHashMap<String, Xpp3Dom>()

static final String COMPONENTS_XML_PATH = "META-INF/plexus/components.xml"
public static final String COMPONENTS_XML_PATH = "META-INF/plexus/components.xml"

boolean canTransformResource(FileTreeElement element) {
def path = element.relativePath.pathString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import org.xml.sax.SAXException
*/
@CacheableTransformer
class XmlAppendingTransformer implements Transformer {
static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance"
public static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance"

@Input
boolean ignoreDtd = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import static org.junit.Assert.*
* Test for {@link ManifestAppenderTransformer}.
*/
class ManifestAppenderTransformerTest extends TransformerTestSupport {
static final String MANIFEST_NAME = "META-INF/MANIFEST.MF"
public static final String MANIFEST_NAME = "META-INF/MANIFEST.MF"

private ManifestAppenderTransformer transformer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PluginSpecification extends Specification {

@Rule TemporaryFolder dir

static final String SHADOW_VERSION = PluginSpecification.classLoader.getResource("shadow-version.txt").text.trim()
public static final String SHADOW_VERSION = PluginSpecification.classLoader.getResource("shadow-version.txt").text.trim()

AppendableMavenFileRepository repo

Expand Down