Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Main build.gradle refactored: - build.gradle converted to gradle/kotlin-dsl (yes, Kotlin scripting for build config of Kscript) - Use plugins dsl instead of buildscript - Shadow JAR file name now consistent for all versions and we avoid copy to root of the project - Fixed project version - Cleaned comments - .gitignore cleanup from useless ignores - Default lifecycle task assemble now builds shadowJar instead of jar - Junit 4.12 (the latest bug fix release of Junit) # Conflicts: # .travis.yml # build.gradle # src/main/kotlin/kscript/app/ResolveIncludes.kt # test/test_suite.sh
- Loading branch information
Showing
15 changed files
with
65 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
plugins { | ||
kotlin("jvm") version "1.2.30" | ||
id("com.github.johnrengelman.plugin-shadow") version "2.0.2" | ||
} | ||
|
||
group = "com.github.holgerbrandl.kscript.launcher" | ||
|
||
dependencies { | ||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib") | ||
|
||
compile("com.offbytwo:docopt:0.6.0.20150202") | ||
|
||
testCompile("junit:junit:4.12") | ||
testCompile( "io.kotlintest:kotlintest:2.0.7") | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
val shadowJar by tasks.getting(ShadowJar::class) { | ||
// set empty string to classifier and version to get predictable jar file name: build/libs/kscript.jar | ||
archiveName = "kscript.jar" | ||
doLast { | ||
copy { | ||
from(File(projectDir, "src/kscript")) | ||
into(archivePath.parentFile) | ||
} | ||
} | ||
} | ||
|
||
// Disable standard jar task to avoid building non-shadow jars | ||
val jar by tasks.getting { | ||
enabled = false | ||
} | ||
// Build shadowJar when | ||
val assemble by tasks.getting { | ||
dependsOn(shadowJar) | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
018c63a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@An1233 Hey!
The main thing was to use Kotlin instead of Groovy for build scripts., it was not really a technical dept, just to use a newer version of DSL
Refactoring also includes migrating to newer recommended practices from Gradle (like plugins DSL)