잡동사니

반응형

질문


Kotlin 스크립트를 사용하여 프로젝트 중 하나를 Gradle로 마이그레이션하려고했습니다.

이것들은 나의 단계입니다.

  • substituted the /gradle/wrapper/gradle-wrapper.jar with this one
  • updated the distributionUrl of gradle/wrapper/gradle-wrapper.properties to the same as here
  • created the corresponding build.gradle.kts
  • setting settings.gradle to rootProject.buildFileName = 'build.gradle.kts'

이 시점에서 Intellij가이를 감지하고 제안합니다.

소스와 함께 배포를 사용하도록 Gradle 래퍼를 구성 할 수 있습니다. IDE에 Gradle API / DSL 문서가 제공됩니다.

-> 좋습니다, 제안을 적용하십시오!

Gradle 'hello-kotlin'프로젝트 새로 고침 실패

오류 : ID가 'kotlin'인 플러그인을 찾을 수 없습니다.

그런 다음 공식 샘플 :

  • cloned the repo
  • opened the sample
  • same error

...내가 뭘 잘못하고 있죠?

공식 샘플로 돌아와서 캐시를 무효화하고 다시 시작하려고 시도했지만 작동하지 않았습니다.

나는 제거하려고

apply {
    plugin("kotlin")
    }

Gradle을 새로 고치고 다시 추가하고 Gradle을 새로 고칩니다.

src 파일을 열면 Intellij는 다음과 같이 말합니다.

Kotlin이 구성되지 않았습니다

그러나 샘플은 현재 실행중인 것 같습니다 ..

Intellij 2017.1 EAP

Kotlin 1.1m04


답변1


지금 작동하는 것 같습니다. 이것이 내가 한 일입니다.

  • I closed the project and quitted Intellij
  • 프로젝트 디렉토리에서 다음을 제거했습니다.

    • .gradle
    • .idea
    • build
    • gradle
    • gradlew
    • gradlew.bat
    • settings.gradle
  • src build.gradle.kts 스크립트 만 남았습니다.

  • hello-kotlin 에서 복사 / 붙여 넣기 :

    • gradle
    • gradlew
    • gradlew.bat
    • settings.gradle
  • Intellij를 열고 "Open Project"를 선택하면 Gradle Project로 자동 표시되어 선택되어 열립니다.


 

 

 

 

출처 : https://stackoverflow.com/questions/41577502/gradle-kotlin-script-plugin-with-id-kotlin-not-found

반응형

이 글을 공유합시다

facebook twitter googleplus kakaoTalk kakaostory naver band