Skip to content

Commit 1ae4611

Browse files
DeviadDavide Pugliese
andauthored
Upgrade gradle and use mavenCentral because jCentral does not exist anymore (#113)
Co-authored-by: Davide Pugliese <dpugliese@adobe.com>
1 parent dc6533b commit 1ae4611

6 files changed

Lines changed: 174 additions & 124 deletions

File tree

build.gradle

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,29 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
plugins {
18+
id 'scala'
19+
id 'java'
20+
id 'idea'
21+
id 'eclipse'
22+
id 'cz.alenkacz.gradle.scalafmt' version "${scalamftVersion}"
23+
}
1724

18-
buildscript {
25+
subprojects {
26+
gradle.ext.scalafmt.configFilePath = gradle.ext.scalafmt.config
27+
pluginManager.apply("cz.alenkacz.gradle.scalafmt")
28+
}
29+
allprojects {
1930
repositories {
20-
jcenter()
21-
}
22-
dependencies {
23-
classpath "cz.alenkacz:gradle-scalafmt:${gradle.scalafmt.version}"
31+
mavenLocal()
32+
mavenCentral()
33+
maven {
34+
url 'https://repo.grails.org/artifactory/core/'
35+
metadataSources {
36+
mavenPom()
37+
artifact()
38+
}
39+
}
2440
}
2541
}
2642

27-
subprojects {
28-
apply plugin: 'scalafmt'
29-
scalafmt.configFilePath = gradle.scalafmt.config
30-
}

gradle.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
scalamftVersion=1.16.2

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
#
1717
distributionBase=GRADLE_USER_HOME
1818
distributionPath=wrapper/dists
19+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
1920
zipStoreBase=GRADLE_USER_HOME
2021
zipStorePath=wrapper/dists
21-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip

settings.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ gradle.ext.scala = [
3434
]
3535

3636
gradle.ext.scalafmt = [
37-
version: '1.5.0',
37+
version: scalamftVersion,
3838
config: new File(rootProject.projectDir, '.scalafmt.conf')
3939
]
4040

4141
gradle.ext.akka = [version : '2.6.12']
4242
gradle.ext.akka_http = [version : '10.2.4']
43+

tests/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ tasks.withType(Test) {
3434
}
3535

3636
dependencies {
37-
compile "org.scala-lang:scala-library:${gradle.scala.version}"
38-
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
39-
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
37+
implementation "org.scala-lang:scala-library:${gradle.scala.version}"
38+
implementation "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
39+
implementation "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
4040
implementation group: 'com.typesafe.akka', name: "akka-http2-support_${gradle.scala.depVersion}", version: "${gradle.akka_http.version}"
4141
implementation group: 'com.typesafe.akka', name: "akka-http-xml_${gradle.scala.depVersion}", version: "${gradle.akka_http.version}"
4242
implementation group: 'com.typesafe.akka', name: "akka-discovery_${gradle.scala.depVersion}", version: "${gradle.akka.version}"

0 commit comments

Comments
 (0)