build scripts cleanup: unecessary 'public' modifiers and duplicated copyright comments removed

This commit is contained in:
nik
2016-09-07 16:49:17 +03:00
parent 75462eb597
commit 639c12f5d9
22 changed files with 20 additions and 196 deletions
@@ -51,9 +51,9 @@ class ApplicationInfoProperties {
shortCompanyName = root.company.first().@shortName ?: shortenCompanyName(companyName)
}
public String getUpperCaseProductName() { shortProductName.toUpperCase() }
String getUpperCaseProductName() { shortProductName.toUpperCase() }
public String getFullVersion() {
String getFullVersion() {
MessageFormat.format(fullVersionFormat, majorVersion, minorVersion, microVersion, patchVersion)
}
@@ -94,7 +94,7 @@ abstract class BuildContext {
abstract boolean shouldBuildDistributionForOS(String os)
public static BuildContext createContext(AntBuilder ant, JpsGantProjectBuilder projectBuilder, JpsProject project, JpsGlobal global,
static BuildContext createContext(AntBuilder ant, JpsGantProjectBuilder projectBuilder, JpsProject project, JpsGlobal global,
String communityHome, String projectHome, ProductProperties productProperties,
ProprietaryBuildTools proprietaryBuildTools = ProprietaryBuildTools.DUMMY,
BuildOptions options = new BuildOptions()) {
@@ -164,7 +164,7 @@ interface BuildMessages {
void error(String message, Throwable cause)
void progress(String message)
public <V> V block(String blockName, Closure<V> body)
def <V> V block(String blockName, Closure<V> body)
void artifactBuild(String relativeArtifactPath)
@@ -67,7 +67,7 @@ abstract class BuildTasks {
abstract void buildUpdaterJar()
public static BuildTasks create(BuildContext context) {
static BuildTasks create(BuildContext context) {
return new BuildTasksImpl(context)
}
}
@@ -13,12 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.intellij.build
import groovy.transform.CompileStatic
@@ -15,7 +15,6 @@
*/
package org.jetbrains.intellij.build
import groovy.transform.Canonical
import groovy.transform.CompileStatic
import groovy.transform.Immutable
@@ -43,7 +43,7 @@ import groovy.transform.Immutable
*/
@CompileStatic
@Immutable
public class MacHostProperties {
class MacHostProperties {
/**
* Mac host host name.
*/
@@ -13,24 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.intellij.build
import com.intellij.openapi.util.MultiValuesMap
@@ -22,7 +22,7 @@ import org.jetbrains.intellij.build.impl.PluginLayout
* @author nik
*/
@CompileStatic
public abstract class ProductProperties {
abstract class ProductProperties {
/**
* Base name for script files (*.bat, *.sh, *.exe), usually a shortened product name in lower case (e.g. 'idea' for IntelliJ IDEA, 'datagrip' for DataGrip)
*/
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
@@ -112,7 +112,7 @@ class BuildMessagesImpl implements BuildMessages {
}
@Override
public <V> V block(String blockName, Closure<V> body) {
<V> V block(String blockName, Closure<V> body) {
try {
processMessage(new LogMessage(LogMessage.Kind.BLOCK_STARTED, blockName))
return body()
@@ -38,7 +38,7 @@ class BundledJreManager {
* Extract JRE for Linux distribution of the product
* @return path to the directory containing 'jre' subdirectory with extracted JRE
*/
public String extractLinuxJre() {
String extractLinuxJre() {
return extractJre("linux")
}
@@ -46,7 +46,7 @@ class BundledJreManager {
* Extract JRE for Windows distribution of the product
* @return path to the directory containing 'jre' subdirectory with extracted JRE
*/
public String extractWinJre(JvmArchitecture arch) {
String extractWinJre(JvmArchitecture arch) {
return extractJre("win", arch)
}
@@ -54,14 +54,14 @@ class BundledJreManager {
* Extract Oracle JRE for Windows distribution of the product
* @return path to the directory containing 'jre' subdirectory with extracted JRE
*/
public String extractOracleWinJre(JvmArchitecture arch) {
String extractOracleWinJre(JvmArchitecture arch) {
return extractJre("win", arch, JreVendor.Oracle)
}
/**
* Return path to a .tar.gz archive containing distribution of JRE for Mac OS which will be bundled with the product
*/
public String findMacJreArchive() {
String findMacJreArchive() {
return findJreArchive("mac")?.absolutePath
}
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
@@ -29,7 +29,7 @@ import org.jetbrains.jps.model.library.JpsOrderRootType
*/
@CompileStatic
class JdkUtils {
public static void defineJdk(JpsGlobal global, String jdkName, String jdkHomePath) {
static void defineJdk(JpsGlobal global, String jdkName, String jdkHomePath) {
def sdk = JpsJavaExtensionService.instance.addJavaSdk(global, jdkName, jdkHomePath)
def toolsJar = new File(jdkHomePath, "lib/tools.jar")
if (toolsJar.exists()) {
@@ -37,7 +37,7 @@ class JdkUtils {
}
}
public static String computeJdkHome(BuildMessages messages, String propertyName, String defaultDir, String envVarName) {
static String computeJdkHome(BuildMessages messages, String propertyName, String defaultDir, String envVarName) {
String jdkDir = System.getProperty(propertyName)
if (jdkDir != null) {
return jdkDir
@@ -37,7 +37,7 @@ class MacDistributionBuilder {
macDistPath = "$buildContext.paths.buildOutputRoot/dist.mac"
}
public layoutMac(File ideaPropertiesFile) {
void layoutMac(File ideaPropertiesFile) {
buildContext.messages.progress("Building distributions for Mac OS")
def docTypes = (customizer.associateIpr ? """
<dict>
@@ -42,13 +42,13 @@ class MacDmgBuilder {
this.remoteDir = remoteDir
}
public static void signBinaryFiles(BuildContext buildContext, MacDistributionCustomizer customizer, MacHostProperties macHostProperties,
static void signBinaryFiles(BuildContext buildContext, MacDistributionCustomizer customizer, MacHostProperties macHostProperties,
String macDistPath) {
def dmgBuilder = createInstance(buildContext, customizer, macHostProperties)
dmgBuilder.doSignBinaryFiles(macDistPath)
}
public static void signAndBuildDmg(BuildContext buildContext, MacDistributionCustomizer customizer, MacHostProperties macHostProperties, String macZipPath) {
static void signAndBuildDmg(BuildContext buildContext, MacDistributionCustomizer customizer, MacHostProperties macHostProperties, String macZipPath) {
MacDmgBuilder dmgBuilder = createInstance(buildContext, customizer, macHostProperties)
def jreArchivePath = buildContext.bundledJreManager.findMacJreArchive()
if (jreArchivePath != null) {
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
@@ -42,12 +27,12 @@ class NsisFileListGenerator {
private final Map<String, List<File>> directoryToFiles = [:]
private final List<String> filesRelativePaths = []
public void addDirectory(String directoryPath, List<String> relativeFileExcludePatterns = []) {
void addDirectory(String directoryPath, List<String> relativeFileExcludePatterns = []) {
def excludePatterns = relativeFileExcludePatterns.collect { Pattern.compile(FileUtil.convertAntToRegexp(it)) }
processDirectory(new File(directoryPath), "", excludePatterns)
}
public void generateInstallerFile(File outputFile) {
void generateInstallerFile(File outputFile) {
outputFile.withWriter { BufferedWriter out ->
directoryToFiles.each {
if (!it.value.empty) {
@@ -62,7 +47,7 @@ class NsisFileListGenerator {
}
}
public void generateUninstallerFile(File outputFile) {
void generateUninstallerFile(File outputFile) {
outputFile.withWriter { BufferedWriter out ->
filesRelativePaths.toSorted().each {
out.writeLine("Delete \"\$INSTDIR\\${toWinPath(it)}\"")
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
@@ -33,7 +18,6 @@ package org.jetbrains.intellij.build.impl
import org.jetbrains.intellij.build.BuildContext
import org.jetbrains.jps.model.java.JpsJavaClasspathKind
import org.jetbrains.jps.model.java.JpsJavaExtensionService
import org.jetbrains.jps.model.module.JpsModule
import org.jetbrains.jps.model.module.JpsModuleReference
/**
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
@@ -1,33 +1,3 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2000-2016 JetBrains s.r.o.
*