|
1 | | -import org.apache.tools.ant.filters.ReplaceTokens |
2 | | - |
3 | 1 | plugins { |
4 | 2 | id 'org.jetbrains.kotlin.jvm' version '1.7.20' |
5 | 3 | id 'maven-publish' |
6 | 4 | id 'com.github.johnrengelman.shadow' version '7.1.2' |
| 5 | + id 'cl.franciscosolis.blossom-extended' version '1.3.1' |
7 | 6 | id 'org.jetbrains.dokka' version '1.7.20' |
8 | 7 | } |
9 | 8 |
|
10 | | -def projectVersion = (System.getenv("VERSION") ?: '0.1.5-SNAPSHOT').replaceFirst("v", "").replace('/', '') |
| 9 | +def projectVersion = (System.getenv("VERSION") ?: '0.1.6-SNAPSHOT').replaceFirst("v", "").replace('/', '') |
11 | 10 |
|
12 | 11 | group 'xyz.theprogramsrc' |
13 | 12 | version projectVersion |
@@ -56,8 +55,12 @@ java { |
56 | 55 | withSourcesJar() |
57 | 56 | } |
58 | 57 |
|
59 | | -processResources { |
60 | | - filter ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description, git_short: System.getenv("GIT_COMMIT_SHORT_HASH") ?: "unknown", git_full: System.getenv("GIT_COMMIT_LONG_HASH") ?: "unknown"] |
| 58 | +blossom { |
| 59 | + replaceToken '@name@', rootProject.name |
| 60 | + replaceToken '@version@', project.version.toString() |
| 61 | + replaceToken '@description@', project.description |
| 62 | + replaceToken '@git_short@', System.getenv("GIT_COMMIT_SHORT_HASH") ?: "unknown" |
| 63 | + replaceToken '@git_full@', System.getenv("GIT_COMMIT_LONG_HASH") ?: "unknown" |
61 | 64 | } |
62 | 65 |
|
63 | 66 | tasks.withType(JavaCompile) { |
@@ -86,10 +89,12 @@ publishing { |
86 | 89 | repositories { |
87 | 90 | if(System.getenv('env') == 'prod'){ |
88 | 91 | maven { |
89 | | - name = 'TheProgramSrcRepository' |
90 | | - credentials.username = System.getenv('NEXUS_USERNAME') |
91 | | - credentials.password = System.getenv('NEXUS_PASSWORD') |
92 | | - url = uri("https://repo.theprogramsrc.xyz/repository/simplecoreapi-modules/") |
| 92 | + name = 'GitHubPackages' |
| 93 | + url = 'https://maven.pkg.github.com/TheProgramSrc/SimpleCore-TasksModule' |
| 94 | + credentials { |
| 95 | + username = System.getenv('GITHUB_ACTOR') |
| 96 | + password = System.getenv('GITHUB_TOKEN') |
| 97 | + } |
93 | 98 | } |
94 | 99 | }else{ |
95 | 100 | mavenLocal() |
|
0 commit comments