Add first test #23
82
build.gradle
82
build.gradle
@ -1,21 +1,75 @@
|
|||||||
|
import java.text.SimpleDateFormat
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "application"
|
id 'application'
|
||||||
|
id 'net.nemerosa.versioning' version '2.15.0'
|
||||||
|
id 'org.ajoberstar.grgit' version '5.0.0-rc.3' // required by gradle
|
||||||
|
|
||||||
|
// TODO: figure out how to integrate proguard
|
||||||
|
// id "com.github.xaverkapeller.proguard-annotations"
|
||||||
|
}
|
||||||
|
|
||||||
|
base.archivesName = project.project_name
|
||||||
|
version = project.project_version
|
||||||
|
group = project.project_group
|
||||||
|
description = 'ES5-compliant JavaScript interpreter'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:0.4.2'
|
||||||
|
compileOnly 'com.github.bsideup.jabel:jabel-javac-plugin:0.4.2'
|
||||||
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
|
||||||
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
toolchain.languageVersion = JavaLanguageVersion.of(11)
|
|
||||||
withSourcesJar()
|
toolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configure([tasks.compileJava]) {
|
||||||
|
options.release = 11
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest.attributes["Main-class"] = project.main_class
|
manifest {
|
||||||
|
attributes(
|
||||||
|
'Main-Class': project.main_class,
|
||||||
|
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
|
||||||
|
'Build-Branch': versioning.info.branch,
|
||||||
|
'Build-Revision': versioning.info.commit,
|
||||||
|
'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
|
||||||
|
'Build-Author': 'TopchetoEU'
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
application {
|
||||||
main.java.srcDirs = [ "src/java" ]
|
mainClass = project.main_class
|
||||||
main.resources.srcDirs = [ "src/assets" ]
|
applicationDefaultJvmArgs = ['-Xmx2G', '-Xms2G', '-server', '-Dfile.encoding=UTF-8']
|
||||||
|
}
|
||||||
|
|
||||||
|
distZip {
|
||||||
|
eachFile { file ->
|
||||||
|
if (file.path.contains('bin')) {
|
||||||
|
file.exclude()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
distTar {
|
||||||
|
eachFile { file ->
|
||||||
|
if (file.path.contains('bin')) {
|
||||||
|
file.exclude()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
@ -27,6 +81,10 @@ processResources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base.archivesName = project.project_name
|
test {
|
||||||
version = project.project_version
|
useJUnitPlatform()
|
||||||
group = project.project_group
|
}
|
||||||
|
|
||||||
|
wrapper {
|
||||||
|
gradleVersion = '8.10'
|
||||||
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
project_group = me.topchetoeu
|
project_group = me.topchetoeu
|
||||||
project_name = jscript
|
project_name = jscript
|
||||||
project_version = 0.9.41-beta
|
project_version = 0.9.41-beta
|
||||||
main_class = me.topchetoeu.jscript.utils.JScriptRepl
|
main_class = me.topchetoeu.jscript.runtime.SimpleRepl
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
|
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rootProject.name = properties.project_name
|
rootProject.name = properties.project_name
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user