forked from guacsec/trustify-da-javascript-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava_gradle_kotlin.js
More file actions
34 lines (23 loc) · 745 Bytes
/
Copy pathjava_gradle_kotlin.js
File metadata and controls
34 lines (23 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import Java_gradle from './java_gradle.js';
/** @typedef {import('../provider').Provider} */
/** @typedef {import('../provider').Provided} Provided */
const KOTLIN_DEP_REGEX = /^[a-zA-Z]+\s?\((.*)\)/
const GRADLE_KOTLIN_FILE = "build.gradle.kts"
export default class Java_gradle_kotlin extends Java_gradle {
/**
* @param {string} manifestName - the subject manifest name-type
* @returns {boolean} - return true if `pom.xml` is the manifest name-type
*/
_getManifestName() {
return GRADLE_KOTLIN_FILE;
}
_parseAliasForLibsNotation(alias) {
return alias.replace(".", "-").replace(")", "")
}
_extractDepToBeIgnored(dep) {
if(dep.match(KOTLIN_DEP_REGEX)) {
return KOTLIN_DEP_REGEX.exec(dep)[1]
}
return null
}
}