尝试运行 gradle 任务时出错。无法弄清楚还需要什么或错误是什么。我正在做的项目有几个子项目,所以我有一个主要的 build.gradle。错误是针对我想尝试 Kotlin 的子项目。
* Where: Build file '/home/oracle/bnc/KotlinHandler/build.gradle' line: 13
* What went wrong: A problem occurred evaluating root project 'KotlinHandler'.
> Failed to apply plugin [id 'kotlin']
> Could not generate a proxy class for class org.jetbrains.kotlin.gradle.tasks.KotlinCompile.
这是失败模块(子项目)的 build.gradle。
buildscript {
ext.kotlin_version = '1.1.2-2'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
这里是 Pastebin build.gradle这是相当大的,因为其中的所有任务
添加了--debug output将 jdk 更改为 1.8 并将依赖项编译为 compile "org.jetbrains.kotlin:kotlin-stdlib-jre8
最佳答案
启动 kotlin 1.1.2 kotlin 编译器不再支持低于 1.8 的 JDK,如 1.1.2 blog post :
The Kotlin compiler now requires JDK 8 to run. You shouldn’t notice any changes, because most other Java development tools such as Gradle and the Android toolchain also require JDK 8, so you almost certainly already have it installed. For code generated by the compiler, Java 1.6 compatibility is still the default, and we have no plans to drop support for generating Java 1.6 compatible bytecode.
关于gradle - Kotlin 插件错误 : Could not generate a proxy class for class org. jetbrains.kotlin.gradle.tasks.KotlinCompile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44087495/
使用Ruby1.9.2运行IDE提示说需要gemruby-debug-base19x并提供安装它。但是,在尝试安装它时会显示消息Failedtoinstallgems.Followinggemswerenotinstalled:C:/ProgramFiles(x86)/JetBrains/RubyMine3.2.4/rb/gems/ruby-debug-base19x-0.11.30.pre2.gem:Errorinstallingruby-debug-base19x-0.11.30.pre2.gem:The'linecache19'nativegemrequiresinstall
我有一个任务列表(名称、starts_at),我试图在每日View中显示它们(就像iCal)。deftodays_tasks(day)Task.find(:all,:conditions=>["starts_atbetween?and?",day.beginning,day.ending]end我不知道如何将Time.now(例如“2009-04-1210:00:00”)动态转换为一天的开始(和结束),以便进行比较。 最佳答案 deftodays_tasks(now=Time.now)Task.find(:all,:conditio
我有rake任务需要持续激活。每当我通过命令运行它时RAILS_ENV=productionrakejobs:abc它工作正常,但是当我关闭终端时rake作业停止了。所以我通过使用nohup在后台运行它找到了其他解决方案。我执行命令:nohupRAILS_ENV=productionrakejobs:work&但它给出了错误:nohup:failedtoruncommand‘RAILS_ENV=production’:Nosuchfileordirectory请建议在生产环境中执行rake任务。 最佳答案 在nohup命令之前设置环
我最近将机器从iMac转移到带有Mavericks的新MacBookPro。一切都很好,但我注意到当我保存文件时Grunt崩溃了(自动更新不工作)。我试图更新我的系统,但是当我通过终端运行我的grunt任务时,我收到以下错误:Running"compass:dev"(compass)task/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in`report_activate_error':CouldnotfindRubyGemcompass(>=0)(Gem:
我有几个类仅由rake任务使用。我意识到rake任务通常存在于@lib/tasks/whatever.rake但我应该在哪里放置支持类?谢谢! 最佳答案 $RAILS_ROOT/lib或$RAILS_ROOT/lib/special_task/可能是最好的,因为它在默认加载路径中,您可以做一个简单的分别需要'my_task_helper'或require'special_task/helper'。 关于ruby-on-rails-RakeTask特定类(class)在哪里生活?(rail
或者,更具体地说:我不能只使用私有(private)方法吗? 最佳答案 据我了解,Thor具有将方法标记为notasks的方法因为方法是任务的概念不同于方法的visibility的概念。.他们需要区分,因为他们从事不同的工作。类Thor的子类的每个方法(独立于其可见性)都被视为任务,除非它被明确标记为无任务。通过控制任务的可见性,您可以控制对该任务的访问,例如如果您将任务设为私有(private),则它不能被子类调用或直接被用户调用。访问控制不同于某事是否是任务。非任务的方法不能被Thor直接调用,它们不能有options.这里举个
我遵循了https://devcenter.heroku.com/articles/queuing-ruby-resque上的教程在Rails应用程序中排队和运行后台作业。在对作业进行排队后,它似乎没有运行任何作业,因为在控制台中我可以看到作业尚未处理>Resque.info=>{:pending=>1,:processed=>0,:queues=>1,:workers=>0,:working=>0,:failed=>0,:servers=>["redis://dory.redistogo.com:9826/0"],:environment=>"production"}如果我尝试(本地
文章目录写在前面1、下载与安装(windows)1.1、idea中配置gradle2、基础知识(Gradle6.9为例)2.1、Gradle脚本语法2.1.1、dependsOn2.1.2、创建动态任务2.1.3、增加任务行为2.1.4、参数2.1.5、Ant任务2.1.6、方法2.1.7、默认任务2.1.6、依赖任务的不同输出3、java项目中使用3.1、在已有项目中构建gradle3.2、在新建项目时构建gradle(idea)3.3、gradle项目目录结构3.4、build.gradle3.4.1、plugins3.4.2、repositories3.4.3、dependencies3
我做了一个railsrake任务,可以上传/裁剪/调整(使用回形针)大量图片。我想知道如何在运行时向终端输出消息(例如chipolata.jpg已处理),最后,它需要几分钟才能运行并且有一点反馈会很好。谢谢。 最佳答案 只需使用标准的Rubyputs命令:puts"HellofromRake!"您可以使用字符串插值在循环中输出单个文件名:puts"#{image_filename}processed" 关于ruby-on-rails-RailsRakeTasks,在期间和结束时输出一条消
我正在尝试解密一组用于数据库迁移的密码。我有一些旧的Rails代码(实际上是一个Runner脚本)可以很好地解密它们。但是将相同的代码放入Rake任务会导致任务失败,并显示...未定义的方法`to_a'for"secretkey":String...为什么在字符串上调用to_a在Rake任务中无效,但在Runner脚本中却完全有效?require'openssl'KEY='secretkey'namespace:importdotask:users=>:environmentdodefdecrypt_password(pw)cipher=OpenSSL::Cipher::Cipher.