Commit Graph

24 Commits

Author SHA1 Message Date
Alexander Udalov aba6ab1299 Refactor command-line interface to kotlin-preloader.jar
Use reasonable defaults for the options: no time profiling, no instrumenters,
empty classpath, 4096 as the class number estimate. Replace 4096 in the
codebase with the constant field.

Keep the old interface intact until the build is bootstrapped and the new one
can be used in all compilation steps
2015-08-24 01:29:58 +03:00
Alexander Udalov 9f2feb1d27 Set failOnError = true by default in kotlinc Ant task as in javac
#KT-8742 Fixed
2015-08-06 22:38:41 +03:00
Dmitry Jemerov 7db1650149 code cleanup: ant, backend modules 2015-07-21 16:20:10 +02:00
Michael Nedzelsky 3ac1bdcdc8 kotlin-maven-plugin, ant:withKotlin: skip compilation for empty sources
#KT-7618 Fixed
2015-06-11 22:21:16 +03:00
Alexander Udalov d475401108 Ant task: don't pass kotlin-runtime.jar to javac on "-no-stdlib" 2015-06-05 16:19:55 +03:00
Alexander Udalov e224337ff3 Ant task: support "compilerarg" element in withKotlin as in kotlinc 2015-06-05 16:19:19 +03:00
Alexander Udalov 89408f45bb Ant task: pass kotlin-runtime to javac's classpath; simplify tests
'kotlinCompiler' test is deleted because it's a very roundabout way to compile
Kotlin and Java sources, and there's no point in testing it.

'javacCompiler' test is deleted for similar reasons: using javac's "compiler"
option is not an advertised way to use Kotlin Ant task, and anyway it will work
with any CompilerAdapter instance, so it's hard to break it (apart from
deleting "withKotlin" adapter).

There are tests which check compilation/running of the same code but with the
recommended method. The pretext for deletion of these tests is to make Ant
tests generated, and that would be easier if they wouldn't depend on any outer
variables
2015-06-05 15:55:58 +03:00
Alexander Udalov 49c78602af Minor, move and rename CompilerClassLoaderHolder -> KotlinAntTaskUtil 2015-06-05 15:55:56 +03:00
Alexander Udalov 8f5826793d Ant task: warn when Ant version < 1.8.2 2015-06-05 15:55:56 +03:00
Alexander Udalov 0ad6dce7ce Ant task: support 'failOnError' attribute in kotlinc and withKotlin 2015-06-05 15:55:54 +03:00
Alexander Udalov 6d00c265e2 Always run kotlinc in <withKotlin/> Ant task
This change requires withKotlin to be run with Ant of version at least 1.8.2.

Some test data changed because now compileList contains both Java and Kotlin
sources

 #KT-7870 Fixed
2015-06-05 15:55:53 +03:00
Alexander Udalov cbbf8dec7e Drop ant-1.7 from project, advance Ant to 1.8.2
Ant 1.8.2 has the API (namely,
CompilerAdapterExtension#getSupportedFileExtensions) which will allow to fix a
critical bug in <withKotlin/> task (see KT-7870)
2015-06-05 15:55:52 +03:00
Alexander Udalov 9008a8b161 Fix withKotlin Ant task when no classpath is given
#KT-6492 Fixed
2015-06-05 15:55:51 +03:00
Michael Nedzelsky d629271510 JS: make -meta-info cli option boolean 2015-05-21 02:30:54 +03:00
Michael Nedzelsky 3bf14518e8 JS backend: add -meta-info command line option for cli compiler 2015-03-18 09:38:53 +03:00
Alexander Udalov 93f02aeead Add source directories to classpath in CLI compiler
Move this logic from Ant and Maven plugins
2015-01-28 19:58:33 +03:00
Alexander Udalov 8ca803775f Rename package jet -> kotlin in cli, cli-common
org.jetbrains.jet.cli -> org.jetbrains.kotlin.cli

Also fix some minor warnings
2015-01-08 23:32:07 +03:00
Alexander Udalov 1bf3ca2e26 Rename package jet -> kotlin in preloader and instrumentation
org.jetbrains.jet.preloading -> org.jetbrains.kotlin.preloading
2015-01-05 04:19:04 +03:00
Alexander Udalov fad40ac11e Rename package jet -> kotlin in ant
org.jetbrains.jet.buildtools.ant -> org.jetbrains.kotlin.ant

The old antlib.xml is kept for migration purposes
2015-01-03 15:16:17 +03:00
Alexander Udalov cd79c4573d Ant task: use preloader instead of AntClassLoader
Speeds up AntTaskJvmTest by 50%
2015-01-03 12:08:12 +03:00
Alexander Udalov 6c145de39e Minor, remove pointless comment and broken URL 2014-12-29 18:00:18 +03:00
Alexander Udalov 14dab749a2 Use reflection in Ant task to invoke compiler
This will allow a more controlled management of the runtime that the compiler
is linked against. Incidentally this also allows Ant task to use any of
compiler arguments via <compilerarg> because Ant task is now just a facade for
the CLI compiler.

The test "wrongArguments" is deleted because the full compiler usage is now
printed out on a wrong <compilerarg>, and this will become inconvenient to
update with each change in compiler arguments

 #KT-5618 Fixed
2014-12-29 18:00:18 +03:00
Alexander Udalov a6566139ee Minor, fix style issues in ant tasks 2014-12-19 14:38:18 +03:00
Alexander Udalov f08c9d9815 Rename module build-tools -> ant 2014-12-10 18:23:46 +03:00