Skip to content

Commit

Permalink
PL-9982 Convert line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
jreznot committed Nov 5, 2017
1 parent 1c86da4 commit 5478e74
Show file tree
Hide file tree
Showing 14 changed files with 3,246 additions and 3,244 deletions.
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* text=auto
* text eol=auto

*.png binary
*.png binary
*.ico binary
*.jar binary
288 changes: 144 additions & 144 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,145 +1,145 @@
/*
* Copyright (c) 2008-2016 Haulmont.
*
* 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.
*
*/

apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'idea'

def defaultVersion = '6.8-SNAPSHOT'
def BUILD_VERSION = 'buildVersion'

def artifactVersion = rootProject.hasProperty(BUILD_VERSION) ? rootProject[BUILD_VERSION] : defaultVersion
def isSnapshot = artifactVersion.endsWith('-SNAPSHOT')

group = 'com.haulmont.gradle'
version = artifactVersion

ext.repositoryUrl = System.getenv('HAULMONT_REPOSITORY_URL') ?: 'https://repo.cuba-platform.com/content/groups/work'
ext.repositoryUser = System.getenv('HAULMONT_REPOSITORY_USER') ?: 'cuba'
ext.repositoryPassword = System.getenv('HAULMONT_REPOSITORY_PASSWORD') ?: 'cuba123'

repositories {
mavenLocal()
maven {
credentials {
username repositoryUser
password repositoryPassword
}
url repositoryUrl
}
}

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

configurations {
deployerJars
}

dependencies {
compile('org.apache.httpcomponents:httpmime:4.5.2')
compile('org.apache.httpcomponents:httpcore:4.4.5')
compile('org.javassist:javassist:3.20.0-GA')
compile('commons-io:commons-io:2.4')

compile('com.yahoo.platform.yui:yuicompressor:2.4.6')
compile('com.carrotsearch:smartsprites:0.2.11')
compile('com.vaadin:vaadin-sass-compiler:0.9.13') {
exclude group: 'com.yahoo.platform.yui', module: 'yuicompressor'
}
compile('com.jelastic:jelastic-public-j2se:5.0.6')
compile('com.moowork.gradle:gradle-node-plugin:1.1.0')
compile('org.apache.commons:commons-dbcp2:2.1.1')

compile(gradleApi())
compile(localGroovy())

testCompile('junit:junit:4.12')

deployerJars('org.apache.maven.wagon:wagon-http:2.12')
}

task sourceJar(type: Jar) {
from sourceSets.main.groovy
from sourceSets.main.java
from sourceSets.main.resources

classifier = 'sources'
}

artifacts {
archives sourceJar
}

def uploadUrl = project.hasProperty('uploadUrl') ? project.uploadUrl : null
def haulmontUploadRepo = System.getenv('HAULMONT_REPOSITORY_UPLOAD_URL')
if (uploadUrl == null && haulmontUploadRepo) {
if (!haulmontUploadRepo.endsWith('/')) {
haulmontUploadRepo += '/'
}
uploadUrl = haulmontUploadRepo + "${isSnapshot ? 'snapshots' : 'releases'}"
}

def uploadUser = project.hasProperty('uploadUser') ? project.uploadUser :
System.getenv('HAULMONT_REPOSITORY_USER')
def uploadPassword = project.hasProperty('uploadPassword') ? project.uploadPassword :
System.getenv('HAULMONT_REPOSITORY_PASSWORD')

uploadArchives.configure {
repositories.mavenDeployer {
name = 'httpDeployer'
configuration = configurations.deployerJars
repository(url: uploadUrl) {
authentication(userName: uploadUser, password: uploadPassword)
}
}
}

String apacheCopyright = '''Copyright (c) 2008-$today.year Haulmont.
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.'''

if (!hasProperty('isAggregatedProject')) {
afterEvaluate {
idea {
project {
ipr.withXml { xmlFile ->
def copyrightManagerNode = xmlFile.asNode().component.find { it.@name == 'CopyrightManager' }
copyrightManagerNode.@default = 'apache'

def node = copyrightManagerNode.appendNode('copyright')
node.appendNode('option', [name: 'notice', value: apacheCopyright])
node.appendNode('option', [name: 'keyword', value: 'Copyright'])
node.appendNode('option', [name: 'allowReplaceKeyword', value: ''])
node.appendNode('option', [name: 'myName', value: 'apache'])
node.appendNode('option', [name: 'myLocal', value: 'true'])
}
}
}
}
/*
* Copyright (c) 2008-2016 Haulmont.
*
* 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.
*
*/

apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'idea'

def defaultVersion = '6.8-SNAPSHOT'
def BUILD_VERSION = 'buildVersion'

def artifactVersion = rootProject.hasProperty(BUILD_VERSION) ? rootProject[BUILD_VERSION] : defaultVersion
def isSnapshot = artifactVersion.endsWith('-SNAPSHOT')

group = 'com.haulmont.gradle'
version = artifactVersion

ext.repositoryUrl = System.getenv('HAULMONT_REPOSITORY_URL') ?: 'https://repo.cuba-platform.com/content/groups/work'
ext.repositoryUser = System.getenv('HAULMONT_REPOSITORY_USER') ?: 'cuba'
ext.repositoryPassword = System.getenv('HAULMONT_REPOSITORY_PASSWORD') ?: 'cuba123'

repositories {
mavenLocal()
maven {
credentials {
username repositoryUser
password repositoryPassword
}
url repositoryUrl
}
}

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

configurations {
deployerJars
}

dependencies {
compile('org.apache.httpcomponents:httpmime:4.5.2')
compile('org.apache.httpcomponents:httpcore:4.4.5')
compile('org.javassist:javassist:3.20.0-GA')
compile('commons-io:commons-io:2.4')

compile('com.yahoo.platform.yui:yuicompressor:2.4.6')
compile('com.carrotsearch:smartsprites:0.2.11')
compile('com.vaadin:vaadin-sass-compiler:0.9.13') {
exclude group: 'com.yahoo.platform.yui', module: 'yuicompressor'
}
compile('com.jelastic:jelastic-public-j2se:5.0.6')
compile('com.moowork.gradle:gradle-node-plugin:1.1.0')
compile('org.apache.commons:commons-dbcp2:2.1.1')

compile(gradleApi())
compile(localGroovy())

testCompile('junit:junit:4.12')

deployerJars('org.apache.maven.wagon:wagon-http:2.12')
}

task sourceJar(type: Jar) {
from sourceSets.main.groovy
from sourceSets.main.java
from sourceSets.main.resources

classifier = 'sources'
}

artifacts {
archives sourceJar
}

def uploadUrl = project.hasProperty('uploadUrl') ? project.uploadUrl : null
def haulmontUploadRepo = System.getenv('HAULMONT_REPOSITORY_UPLOAD_URL')
if (uploadUrl == null && haulmontUploadRepo) {
if (!haulmontUploadRepo.endsWith('/')) {
haulmontUploadRepo += '/'
}
uploadUrl = haulmontUploadRepo + "${isSnapshot ? 'snapshots' : 'releases'}"
}

def uploadUser = project.hasProperty('uploadUser') ? project.uploadUser :
System.getenv('HAULMONT_REPOSITORY_USER')
def uploadPassword = project.hasProperty('uploadPassword') ? project.uploadPassword :
System.getenv('HAULMONT_REPOSITORY_PASSWORD')

uploadArchives.configure {
repositories.mavenDeployer {
name = 'httpDeployer'
configuration = configurations.deployerJars
repository(url: uploadUrl) {
authentication(userName: uploadUser, password: uploadPassword)
}
}
}

String apacheCopyright = '''Copyright (c) 2008-$today.year Haulmont.
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.'''

if (!hasProperty('isAggregatedProject')) {
afterEvaluate {
idea {
project {
ipr.withXml { xmlFile ->
def copyrightManagerNode = xmlFile.asNode().component.find { it.@name == 'CopyrightManager' }
copyrightManagerNode.@default = 'apache'

def node = copyrightManagerNode.appendNode('copyright')
node.appendNode('option', [name: 'notice', value: apacheCopyright])
node.appendNode('option', [name: 'keyword', value: 'Copyright'])
node.appendNode('option', [name: 'allowReplaceKeyword', value: ''])
node.appendNode('option', [name: 'myName', value: 'apache'])
node.appendNode('option', [name: 'myLocal', value: 'true'])
}
}
}
}
}
84 changes: 42 additions & 42 deletions src/main/groovy/CubaClearMessagesCache.groovy
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
/*
* Copyright (c) 2008-2016 Haulmont.
*
* 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.
*
*/

import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction

/**
*
*/
class CubaClearMessagesCache extends DefaultTask {

def appName = 'app'

CubaClearMessagesCache() {
setDescription('Clears messages cache')
setGroup('Deployment')
}

@TaskAction
protected void copyTriggerFile() {
def fileName = "${project.cuba.tomcat.dir}/temp/$appName/triggers/cuba_Messages.clearCache"
File file = new File(fileName)
if (!file.exists()) {
project.logger.info "[CubaClearMessagesCache] creating $fileName"
file.getParentFile().mkdirs()
file.createNewFile()
}
}
/*
* Copyright (c) 2008-2016 Haulmont.
*
* 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.
*
*/

import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction

/**
*
*/
class CubaClearMessagesCache extends DefaultTask {

def appName = 'app'

CubaClearMessagesCache() {
setDescription('Clears messages cache')
setGroup('Deployment')
}

@TaskAction
protected void copyTriggerFile() {
def fileName = "${project.cuba.tomcat.dir}/temp/$appName/triggers/cuba_Messages.clearCache"
File file = new File(fileName)
if (!file.exists()) {
project.logger.info "[CubaClearMessagesCache] creating $fileName"
file.getParentFile().mkdirs()
file.createNewFile()
}
}
}
Loading

0 comments on commit 5478e74

Please sign in to comment.