Skip to content

Commit 50fb8dd

Browse files
committed
Migrate gradle project for DaVinci Configurator 6
1 parent 774cefa commit 50fb8dd

10 files changed

Lines changed: 581 additions & 631 deletions

build.gradle

Lines changed: 62 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,62 @@
1-
// Define used (gradle) plugins
2-
plugins {
3-
id 'base'
4-
id 'org.jetbrains.kotlin.jvm' version '2.0.21' apply false
5-
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.21' apply false
6-
id 'com.github.gmazzo.buildconfig' version '4.1.2' apply false
7-
}
8-
9-
// Define the group for all built artifacts
10-
allprojects {
11-
group = 'com.vector.ocs.plugins'
12-
}
13-
14-
// Declare all used repositories
15-
subprojects {
16-
repositories {
17-
mavenCentral()
18-
// Repository for Vector artifacts like OCS Core or Domain Plugins
19-
maven {
20-
// Adjust path here to find maven repository if necessary
21-
url "../../" + property('ocsRepo')
22-
}
23-
// Local publishing for quick development processes
24-
mavenLocal()
25-
}
26-
}
27-
28-
//-----------
29-
// PUBLISHING
30-
// ----------
31-
32-
enum PublishMode {
33-
NORMAL, SNAPSHOT, LOCKED
34-
}
35-
36-
// Provided PublishMode parameter (string) from command line call is evaluated
37-
// and the PublishMode object is set accordingly
38-
PublishMode evalPublishMode() {
39-
String key = 'publishMode'
40-
if (!rootProject.hasProperty(key)) {
41-
return PublishMode.LOCKED
42-
}
43-
String value = rootProject.property(key)
44-
switch (value) {
45-
case 'normal': return PublishMode.NORMAL
46-
case 'snapshot': return PublishMode.SNAPSHOT
47-
default: return PublishMode.LOCKED
48-
}
49-
}
50-
51-
long currentTimeMillis = System.currentTimeMillis()
52-
53-
// For Snapshot publishing a timestamp is added onto the version of the published artifact (plugin)
54-
rootProject.ext.publishVersion = { Project project ->
55-
String result = project.version
56-
if (evalPublishMode() == PublishMode.SNAPSHOT) {
57-
result = result + '-' + currentTimeMillis
58-
}
59-
return result
60-
}
1+
// Define used (gradle) plugins
2+
plugins {
3+
id 'base'
4+
id 'org.jetbrains.kotlin.jvm' version '2.1.21' apply false
5+
id "org.jetbrains.kotlin.plugin.sam.with.receiver" version "2.0.21"
6+
id 'org.jetbrains.kotlin.plugin.serialization' version '2.1.21' apply false
7+
id 'com.github.gmazzo.buildconfig' version '4.1.2' apply false
8+
id "com.vector.cfg.pai.automation-build-gradle" version "1.+" apply false
9+
}
10+
11+
// Define the group for all built artifacts
12+
allprojects {
13+
group = 'com.vector.ocs.plugins'
14+
}
15+
16+
// Declare all used repositories
17+
subprojects {
18+
repositories {
19+
mavenCentral()
20+
// Repository for Vector artifacts like OCS Core or Domain Plugins
21+
maven {
22+
// Adjust path here to find maven repository if necessary
23+
url "../../" + property('ocsRepo')
24+
}
25+
// Local publishing for quick development processes
26+
mavenLocal()
27+
}
28+
}
29+
30+
//-----------
31+
// PUBLISHING
32+
// ----------
33+
34+
enum PublishMode {
35+
NORMAL, SNAPSHOT, LOCKED
36+
}
37+
38+
// Provided PublishMode parameter (string) from command line call is evaluated
39+
// and the PublishMode object is set accordingly
40+
PublishMode evalPublishMode() {
41+
String key = 'publishMode'
42+
if (!rootProject.hasProperty(key)) {
43+
return PublishMode.LOCKED
44+
}
45+
String value = rootProject.property(key)
46+
switch (value) {
47+
case 'normal': return PublishMode.NORMAL
48+
case 'snapshot': return PublishMode.SNAPSHOT
49+
default: return PublishMode.LOCKED
50+
}
51+
}
52+
53+
long currentTimeMillis = System.currentTimeMillis()
54+
55+
// For Snapshot publishing a timestamp is added onto the version of the published artifact (plugin)
56+
rootProject.ext.publishVersion = { Project project ->
57+
String result = project.version
58+
if (evalPublishMode() == PublishMode.SNAPSHOT) {
59+
result = result + '-' + currentTimeMillis
60+
}
61+
return result
62+
}

gradle.properties

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ org.gradle.daemon=true
55
#localSipStore=path/to/sip/store/directory
66
#localSip=path/to/used/sip/external
77
ocsRepo=../repository
8+
#cfg6=path/to/davinci configurator/directory
89

9-
vOcsCore=1.7.0
10-
vPluginsCommon=1.5.0
11-
vOcsCom=1.8.0
12-
vOcsDiag=1.8.0
13-
vOcsNvM=1.8.0
14-
vOcsEcuState=1.8.0
15-
vOcsRuntime=1.8.0
16-
vOcsSecurity=1.6.0
10+
vOcsCore=3.1.0
11+
vPluginsCommon=2.2.0
12+
vOcsCom=2.2.0
13+
vOcsDiag=2.2.0
14+
vOcsNvM=2.2.0
15+
vOcsEcuState=2.2.0
16+
vOcsRuntime=2.2.0
17+
vOcsSecurity=2.2.0
18+
19+
kotlin.stdlib.default.dependency=false

gradle/dvCfgAutomationBootstrap.gradle

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)