diff --git a/.gitignore b/.gitignore index c9df838a52..605a45103c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,11 @@ -/out .idea/workspace.xml -.idea/libraries/Gradle* -.gradle/ -build/ -common-lib/.gradle/ -common-lib/build/ -core-plugin/.gradle/ -core-plugin/build/ -core-plugin/core-plugin.zip -google-account-plugin/.gradle/ -google-account-plugin/.idea/inspectionProfiles/ -google-account-plugin/build/ -google-account-plugin/google-account-plugin.zip -idea-IC/ +.idea/modules.xml +.idea/misc.xml .idea/gradle.xml -.idea/codeStyleSettings.xml +.idea/compiler.xml +.idea/shelf/ +.idea/libraries/ +.idea/.name +**/*.iml +.gradle/ +**/build/ \ No newline at end of file diff --git a/.idea/.name b/.idea/.name index 4d803351ee..5ed74ab079 100644 --- a/.idea/.name +++ b/.idea/.name @@ -1 +1 @@ -google-cloud-tools \ No newline at end of file +gcloud-intellij \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 3a595dc017..9a8b7e5c45 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -18,6 +18,5 @@ - \ No newline at end of file diff --git a/.idea/ct4ij.iml b/.idea/ct4ij.iml deleted file mode 100644 index d6ebd48059..0000000000 --- a/.idea/ct4ij.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/git4idea.xml b/.idea/libraries/git4idea.xml deleted file mode 100644 index d19a0ea534..0000000000 --- a/.idea/libraries/git4idea.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/gradle.xml b/.idea/libraries/gradle.xml deleted file mode 100644 index f572fb737c..0000000000 --- a/.idea/libraries/gradle.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/groovy_jps_plugin.xml b/.idea/libraries/groovy_jps_plugin.xml deleted file mode 100644 index 836d50e4c3..0000000000 --- a/.idea/libraries/groovy_jps_plugin.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/idea_junit.xml b/.idea/libraries/idea_junit.xml deleted file mode 100644 index 5bf6ed98c2..0000000000 --- a/.idea/libraries/idea_junit.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/properties.xml b/.idea/libraries/properties.xml deleted file mode 100644 index 3979ef30ea..0000000000 --- a/.idea/libraries/properties.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 832cd7eadb..0000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - Android Lint - - - General - - - Maven - - - Plugin DevKit - - - XPath - - - - - Abstraction issues - - - - - - - - - - - - - - - - - - - diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index a1b6369e05..0000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/.idea/runConfigurations/Core_IJ_Community.xml b/.idea/runConfigurations/Core_IJ_Community.xml deleted file mode 100644 index acab48c7ca..0000000000 --- a/.idea/runConfigurations/Core_IJ_Community.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml index 33aa59e5c1..e96534fb27 100644 --- a/.idea/uiDesigner.xml +++ b/.idea/uiDesigner.xml @@ -2,12 +2,12 @@ - - - + + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1ddfbb..94a25f7f4c 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4fc091fef9..0696e99e0d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,37 +41,17 @@ Other useful targets while developing include: * $ ./gradlew test: run tests * $ ./gradlew check: run static analysis tools * $ ./gradlew clean: remove all build artifacts - -Gradle builds fail on Windows due to reliance on the fetchIdea.sh shell script. -This script simply downloads and installs IntelliJ IDEA code for building against -and shouldn't be too hard to port to Windows. See -[Issue 167](https://github.com/GoogleCloudPlatform/gcloud-intellij/issues/167). -As a quick workaround you can manually download and install the relevant -IDEA distribution and comment out the loadIdea task in -[build.gradle](https://github.com/GoogleCloudPlatform/gcloud-intellij/blob/master/build.gradle). - -On Windows you should be able to build the plugins inside IntelliJ by -selecting "Prepare All Plugin Modules For Deployment" from the Build menu. +* $ ./gradlew runIdea: run IntelliJ preconfigured with the plugins from this project. ## Configuring and Debugging in IntelliJ ### Import Project -To work in IDEA, just "Open" the cloud-tools-for-intellij directory -(the root directory cloned from Github) from the IDEA opening screen. - -Alternately you can select "Import Project" from the IDEA opening screen and -choose the root build.gradle file. In this case, IDE features for IDEA plugin -development may not work; and run and debug configurations will not -be available from within the IDE. However, you can run and debug unit tests. - -### Optional: Downloading source for IDEA to debug. - -[Download the IDEA source tarball from JetBrains](http://www.jetbrains.org/display/IJOS/Download) -into your home (or any other convenient) directory. Extract it and -add the resulting directory (usually something like ideaIC-141.1532.4) -in the Sourcepath tab of Project Structure > SDKs for the IntelliJ CE 141.1532 SDK. - +1. 'New project from existing sources' +1. Select the root build.gradle file to import +1. Git revert changes to the .idea folder because IDEA Gradle import blows it away + (https://youtrack.jetbrains.com/issue/IDEA-146295) +1. Run or debug the **Cloud Tools on IntelliJ** run configuration ## Contributing code diff --git a/build.gradle b/build.gradle index 7cb6f0ace4..a4cb1d5e92 100644 --- a/build.gradle +++ b/build.gradle @@ -1,19 +1,23 @@ -plugins { - id 'net.researchgate.release' version '2.3.4' +buildscript { + repositories { + maven { url 'http://repo.spring.io/plugins-release' } + } + dependencies { + classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7' + } } -apply plugin: 'base' - -task loadIdea(type:Exec) { - commandLine './fetchIdea.sh' +configure(allprojects) { + apply plugin: 'propdeps' + apply plugin: 'propdeps-idea' } subprojects { apply plugin: 'java' - apply plugin: 'findbugs' - apply plugin: 'pmd' - apply plugin: 'jdepend' + sourceCompatibility = javaVersion + targetCompatibility = javaVersion + group = 'com.google.gct' version = '0.9-alpha.1-SNAPSHOT' @@ -22,15 +26,11 @@ subprojects { } dependencies { - compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.+' - compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5' - testCompile group: 'junit', name: 'junit', version: '4.+' - testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5' - } + compile 'com.google.guava:guava:18.0' - compileJava.dependsOn ':loadIdea' - sourceCompatibility = 1.6 - targetCompatibility = 1.6 + testCompile 'junit:junit:4.+' + testCompile 'org.mockito:mockito-all:1.9.5' + } processResources { filesMatching("**/plugin.xml") { @@ -38,46 +38,29 @@ subprojects { } } -} - - -// Configuration to package IDEA with our plugins pre-installed in -// the root project build directory - -ext.devBuildDir = "${buildDir}/idea-IC-gcloud" -ext.devConfigDir = "${buildDir}/idea-IC-gcloud-config" + apply plugin: 'findbugs' + findbugs { + ignoreFailures = true + sourceSets = [sourceSets.main] + effort = "max" + } -task devBuild(type:Copy) { - dependsOn cleanDevBuild - from ('idea-IC') - into project.devBuildDir - doLast { - def ideaConfigFile = new File(devBuildDir, 'bin/idea.properties') - assert ideaConfigFile.exists() - ideaConfigFile.withWriterAppend('UTF-8') { writer -> - writer.writeLine('\n# CHANGES FOR TEST BUILDS OF PLUGIN'); - writer.writeLine("idea.config.path=${devConfigDir}/config"); - writer.writeLine("idea.system.path=${devConfigDir}/system"); - writer.writeLine('idea.plugins.path=${idea.config.path}/plugins'); - writer.writeLine('idea.log.path=${idea.system.path}/log'); - } - def jvmConfigFile = new File(devBuildDir, 'bin/idea64.vmoptions') - assert jvmConfigFile.exists() - jvmConfigFile.withWriterAppend('UTF-8') { writer -> - writer.writeLine('-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005'); + tasks.withType(FindBugs) { + reports { + xml.enabled = false + html.enabled = true } } -} -subprojects { - afterEvaluate { project -> - if (project.hasProperty("plugin") && (project.plugin instanceof Zip)) { - rootProject.devBuild { - dependsOn project.plugin - from (zipTree(project.plugin.archivePath)) { - into 'plugins' - } - } - } + apply plugin: 'pmd' + pmd { + ignoreFailures = true + sourceSets = [sourceSets.main] } + + apply plugin: 'jdepend' } + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/common-lib/build.gradle b/common-lib/build.gradle index 60c17463c9..bd6c50510a 100644 --- a/common-lib/build.gradle +++ b/common-lib/build.gradle @@ -1,27 +1,8 @@ -apply plugin: 'java' - -repositories { - mavenCentral() +// Not an IJ plugin project, but included to add IntelliJ platform dependencies to the classpath +plugins { + id "org.jetbrains.intellij" version "0.0.28" } -def ideaHome = '../idea-IC/' -def ideaLib = ideaHome + 'lib/' - dependencies { compile files('lib/GoogleFeedback.jar') - compile files(ideaLib + 'annotations.jar') - compile files(ideaLib + 'extensions.jar') - compile files(ideaLib + 'idea.jar') - compile files(ideaLib + 'openapi.jar') - compile files(ideaLib + 'picocontainer.jar') - compile files(ideaLib + 'resources_en.jar') - compile files(ideaLib + 'util.jar') - - // todo(elharo): install these in third_party - compile files(ideaLib + 'jdom.jar') - - compile files('third_party/guava/guava-18.0.jar') - - testCompile files(ideaLib + 'junit-4.11.jar') - testCompile files('third_party/mockito/mockito-all-1.9.5.jar') } diff --git a/common-lib/common-lib.iml b/common-lib/common-lib.iml deleted file mode 100644 index 00a1b49d72..0000000000 --- a/common-lib/common-lib.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/common-test-lib/build.gradle b/common-test-lib/build.gradle index a38bf6c529..1397bb4595 100644 --- a/common-test-lib/build.gradle +++ b/common-test-lib/build.gradle @@ -1,10 +1,9 @@ -apply plugin: 'java' - -repositories { - mavenCentral() +// Not an IJ plugin project, but included to add IntelliJ platform dependencies to the classpath +plugins { + id "org.jetbrains.intellij" version "0.0.28" } dependencies { - compile files('third_party/junit/junit-4.11.jar') - compile files('third_party/mockito/mockito-all-1.9.5.jar') -} + compile 'junit:junit:4.+' + compile 'org.mockito:mockito-all:1.9.5' +} \ No newline at end of file diff --git a/common-test-lib/common-test-lib.iml b/common-test-lib/common-test-lib.iml deleted file mode 100644 index aa0dfb2291..0000000000 --- a/common-test-lib/common-test-lib.iml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core-plugin/.gitignore b/core-plugin/.gitignore deleted file mode 100644 index bc1ff0657e..0000000000 --- a/core-plugin/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -out/ -.DS_Store -.idea/workspace.xml diff --git a/core-plugin/build.gradle b/core-plugin/build.gradle index cc45b953dc..61f2a1d21a 100644 --- a/core-plugin/build.gradle +++ b/core-plugin/build.gradle @@ -1,64 +1,53 @@ -apply from: '../scripts/javac2.gradle' -def ideaHome = '../idea-IC/' -def pluginName = 'google-cloud-tools-core' +plugins { + id "org.jetbrains.intellij" version "0.0.29" +} + +// **replace** default sourceSets with idea layout +sourceSets.main.java.srcDirs = ['src'] +sourceSets.main.resources.srcDirs = ['resources'] +sourceSets.test.java.srcDirs = ['testSrc'] +sourceSets.test.resources.srcDirs = ['testResources'] + +apply plugin: 'org.jetbrains.intellij' + +intellij { + pluginName = 'google-cloud-tools-core' + plugins 'Groovy','gradle', 'git4idea', 'properties', 'junit' + version = ideaVersion + sandboxDirectory = "${rootProject.buildDir}/idea-sandbox" +} + +project.afterEvaluate { + project.tasks.getByPath(':core-plugin:prepareSandbox').dependsOn ':google-account-plugin:prepareSandbox' + project.configurations.provided.each { + intellij.intellijFiles.add(it) + } +} dependencies { - compile(project(':google-account-plugin')) { + provided(project(':google-account-plugin')) { transitive = false } compile(project(':common-lib')) { transitive = false } - compile files('lib/google-api-services-clouddebugger-v2-rev4-1.20.0.jar') - compile files('lib/google-api-services-developerprojects-v1-rev20140815212553-1.19.0.jar') - compile files('lib/google-api-services-source.jar') - compile files(ideaHome + '/plugins/git4idea/lib/git4idea.jar') - compile files(ideaHome + '/lib/annotations.jar') - compile files(ideaHome + '/lib/bootstrap.jar') - compile files(ideaHome + '/lib/extensions.jar') - compile files(ideaHome + '/lib/forms_rt.jar') - compile files(ideaHome + '/lib/jdom.jar') - compile files(ideaHome + '/lib/idea.jar') - compile files(ideaHome + '/lib/openapi.jar') - compile files(ideaHome + '/lib/util.jar') - compile fileTree(dir: ideaHome + '/plugins/Groovy/lib') - compile fileTree(dir: ideaHome + '/plugins/gradle/lib') - compile files('../google-account-plugin/lib/google.gdt.eclipse.login.common.jar') - compile files('../google-account-plugin/third_party/repackaged/google-api-java-client-min-repackaged-1.20.0.jar') - compile 'com.google.appengine:gradle-appengine-builder-model:0.1.0' compile 'org.eclipse.jgit:org.eclipse.jgit:3.3.0.201403021825-r' // todo(elharo): we shouldn't need Apache commons; Guava will suffice compile 'commons-io:commons-io:2.4' + provided files('../google-account-plugin/lib/google.gdt.eclipse.login.common.jar') + provided files('../google-account-plugin/third_party/repackaged/google-api-java-client-min-repackaged-1.20.0.jar') + compile files('lib/google-api-services-clouddebugger-v2-rev4-1.20.0.jar') + compile files('lib/google-api-services-developerprojects-v1-rev20140815212553-1.19.0.jar') + compile files('lib/google-api-services-source.jar') - testCompile files(ideaHome + '/lib/picocontainer.jar') - testCompile files(ideaHome + '/lib/trove4j.jar') - testCompile files('third_party/jackson-core-asl/jackson-core-asl-1.9.11.jar') - testCompile files(ideaHome + '/plugins/git4idea/lib/remote-servers-git.jar') - testCompile files(ideaHome + '/plugins/git4idea/lib/resources_en.jar') - testCompile files(ideaHome + '/plugins/properties/lib/properties.jar') - testCompile files(ideaHome + '/plugins/gradle/lib/gradle-tooling-api-2.2.jar') - testCompile files(ideaHome + '/plugins/junit/lib/idea-junit.jar') - testCompile files("${System.properties['java.home']}/../lib/tools.jar") - - testCompile files('third_party/org-eclipse-jgit/org.eclipse.jgit-3.3.0.201403021825-r.jar') - testCompile files('third_party/org-eclipse-jgit-junit/org.eclipse.jgit.junit-3.0.0.201306101825-r.jar') - testCompile files('third_party/mockito/mockito-all-1.9.5.jar') - - testRuntime files('../google-account-plugin/lib/google-api-services-oauth2-v2-rev70-1.18.0-rc.jar') - testRuntime files('../google-account-plugin/lib/google-http-client-jackson-1.18.0-rc.jar') + testCompile 'org.eclipse.jgit:org.eclipse.jgit.junit:3.3.0.201403021825-r' + testRuntime 'com.google.apis:google-api-services-oauth2:v2-rev70-1.18.0-rc' + testRuntime 'com.google.http-client:google-http-client-jackson:1.18.0-rc' testRuntime files('../google-account-plugin/lib/google-gct-login-context-ij-pg.jar') - testRuntime files(ideaHome + '/lib/log4j.jar') - testRuntime files(ideaHome + '/lib/idea_rt.jar') - testRuntime fileTree(dir: ideaHome + '/lib', include: '*.jar') } -// **replace** default sourceSets with idea layout -sourceSets.main.java.srcDirs = ['src', 'resources'] -sourceSets.main.resources.srcDirs = ['resources'] -sourceSets.test.java.srcDirs = ['testSrc'] - test { testLogging { events "skipped", "failed" @@ -68,41 +57,3 @@ test { } } -task plugin(type: Zip, dependsOn: jar) { - baseName = pluginName - destinationDir = file('build') - include '*.jar' - from('build/libs') { - into(pluginName + '/lib') - } - from('../common-lib/build/libs') { - into(pluginName + '/lib') - } - from('../common-lib/lib') { - into(pluginName + '/lib') - } - from('lib/') { - into(pluginName + '/lib') - } - from('third_party/gradle-appengine-builder-model') { - into(pluginName + '/lib') - } -} - -findbugs { - ignoreFailures = true - sourceSets = [sourceSets.main] - effort = "max" -} - -tasks.withType(FindBugs) { - reports { - xml.enabled = false - html.enabled = true - } -} - -pmd { - ignoreFailures = true - sourceSets = [sourceSets.main] -} diff --git a/core-plugin/core-plugin.iml b/core-plugin/core-plugin.iml deleted file mode 100644 index b85e779ac9..0000000000 --- a/core-plugin/core-plugin.iml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core-plugin/testSrc/com/google/gct/idea/appengine/synchronization/SampleSyncTaskTest.java b/core-plugin/testSrc/com/google/gct/idea/appengine/synchronization/SampleSyncTaskTest.java index 0f50a8f30f..e7ec8e9fcb 100644 --- a/core-plugin/testSrc/com/google/gct/idea/appengine/synchronization/SampleSyncTaskTest.java +++ b/core-plugin/testSrc/com/google/gct/idea/appengine/synchronization/SampleSyncTaskTest.java @@ -15,7 +15,6 @@ */ package com.google.gct.idea.appengine.synchronization; - import com.google.common.collect.Lists; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.ListBranchCommand; diff --git a/fetchIdea.sh b/fetchIdea.sh deleted file mode 100755 index 59982ce242..0000000000 --- a/fetchIdea.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2015 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ideaVersion="14.1.4" - -if [ ! -d ./idea-IC/lib ]; then - wget http://download.jetbrains.com/idea/ideaIC-${ideaVersion}.tar.gz - - # Unzip IDEA - tar zxf ideaIC-${ideaVersion}.tar.gz - rm -rf ideaIC-${ideaVersion}.tar.gz - ls - - # Move the versioned IDEA folder to a known location - ideaPath=$(find . -name 'idea-IC-*' -type d -prune | head -n 1) - echo ${ideaPath} - mv ${ideaPath} ./idea-IC -fi - diff --git a/google-account-plugin/build.gradle b/google-account-plugin/build.gradle index 1c40fcc76c..4512716f5b 100644 --- a/google-account-plugin/build.gradle +++ b/google-account-plugin/build.gradle @@ -1,84 +1,40 @@ -// see https://github.com/JetBrains/gradle-intellij-plugin +plugins { + id "org.jetbrains.intellij" version "0.0.29" +} -apply from: '../scripts/javac2.gradle' -def ideaLib = '../idea-IC/lib/' +sourceSets.main.java.srcDirs = ['src'] +sourceSets.main.resources.srcDirs = ['resources'] +sourceSets.test.java.srcDirs = ['testSrc'] +sourceSets.test.resources.srcDirs = ['testResources'] -dependencies { +intellij { + pluginName = 'google-account' + version = ideaVersion + downloadSources = true + sandboxDirectory = "${rootProject.buildDir}/idea-sandbox" +} + +task logSandbox << { + println 'account sandbox preparation run' +} +dependencies { compile(project(':common-lib')) { transitive = false } compile files('lib/google.gdt.eclipse.login.common.jar') compile files('lib/google-gct-login-context-ij-pg.jar') - compile files('lib/google-api-services-oauth2-v2-rev70-1.18.0-rc.jar') - compile files('lib/google-http-client-jackson-1.18.0-rc.jar') compile fileTree(dir: 'third_party/repackaged', include: '*.jar') - compile files(ideaLib + 'annotations.jar') - compile files(ideaLib + 'extensions.jar') - compile files(ideaLib + 'idea.jar') - compile files(ideaLib + 'openapi.jar') - compile files(ideaLib + 'util.jar') - compile files('third_party/javax-servlet-api/javax.servlet-api-3.0.1.jar') - compile 'com.google.guava:guava:18.0' + compile 'com.google.apis:google-api-services-oauth2:v2-rev70-1.18.0-rc' + compile 'com.google.http-client:google-http-client-jackson:1.18.0-rc' + compile 'javax.servlet:javax.servlet-api:3.0.1' compile 'net.jcip:jcip-annotations:1.0' + runtime 'org.codehaus.jackson:jackson-core-asl:1.9.11' - runtime files('third_party/jackson-core-asl/jackson-core-asl-1.9.11.jar') - - testCompile files(ideaLib + 'junit-4.11.jar') - testCompile files('third_party/mockito/mockito-all-1.9.5.jar') -} - -// **replace** default sourceSets with idea layout -sourceSets.main.java.srcDirs = ['src', 'resources'] -sourceSets.main.resources.srcDirs = ['resources'] -sourceSets.test.java.srcDirs = ['testSrc'] - -task plugin(type: Zip, dependsOn: jar) { - // by default uses version = 1.0 - baseName = 'google-account' - destinationDir = file('build') - include '*.jar' - from('build/libs') { - into('google-account/lib') - } - from('../common-lib/build/libs') { - into('google-account/lib') - } - from('../common-lib/lib') { - into('google-account/lib') - } - from('lib/') { - into('google-account/lib') - } - from('third_party/repackaged') { - into('google-account/lib') - } - from('third_party/javax-servlet-api') { - into('google-account/lib') - } - from('third_party/jackson-core-asl') { - into('google-account/lib') - } -} - -findbugs { - ignoreFailures = true - sourceSets = [sourceSets.main] - effort = "max" -} - -tasks.withType(FindBugs) { - reports { - xml.enabled = false - html.enabled = true - } -} - -pmd { - ignoreFailures = true - sourceSets = [sourceSets.main] + testCompile 'xalan:serializer:2.7.1' + testCompile files("${System.properties['java.home']}/../lib/tools.jar") } processResources { @@ -89,4 +45,4 @@ processResources { expand "usageTrackerProperty": trackerProperty } } -} +} \ No newline at end of file diff --git a/google-account-plugin/google-account-plugin.iml b/google-account-plugin/google-account-plugin.iml deleted file mode 100644 index 2a17652e56..0000000000 --- a/google-account-plugin/google-account-plugin.iml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000000..f04ca7d5be --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +ideaVersion = IC-14.1.4 +javaVersion = 1.6 +intellijGradlePluginVersion = "0.0.28" \ No newline at end of file diff --git a/scripts/javac2.gradle b/scripts/javac2.gradle deleted file mode 100644 index b4d2a40fba..0000000000 --- a/scripts/javac2.gradle +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Script that replaces javac with javac2 by removing all actions in compileJava - * and drops in a single action that calls the javac2 ant task defined by JetBrains - */ -def javac2Lib = '../idea-IC/lib' - -configurations { - javac2 -} - -dependencies { - javac2 files(javac2Lib + '/javac2.jar') - javac2 files(javac2Lib + '/jdom.jar') - javac2 files(javac2Lib + '/asm.jar') - javac2 files(javac2Lib + '/asm-all.jar') - javac2 files(javac2Lib + '/asm-commons.jar') - javac2 files(javac2Lib + '/jgoodies-forms.jar') -} - -// overwrite compileJava to use intellij javac2 -// https://grahamedgecombe.com/blog/2013/04/03/using-intellij-ideas-javac2-in-gradle -// https://discuss.gradle.org/t/replacing-tasks-overwrite-true-does-not-work-in-1-5/2148/3 -compileJava { - actions = [] - doLast { - project.sourceSets.main.output.classesDir.mkdirs() - ant.taskdef name: 'javac2', - classname: 'com.intellij.ant.Javac2', - classpath: configurations.javac2.asPath - ant.javac2 srcDir: project.sourceSets.main.java.srcDirs.join(':'), - classpath: project.sourceSets.main.compileClasspath.asPath, - destDir: project.sourceSets.main.output.classesDir, - source: sourceCompatibility, - target: targetCompatibility, - includeAntRuntime: false - /** other flags - * optimize = "on/off" - * deprecation = "on/off" - * debugLevel = "something" - * debug = "on/off" - */ - } -} diff --git a/settings.gradle b/settings.gradle index 9a4ccb540a..8e6eae354a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include 'google-account-plugin', 'core-plugin', 'common-lib' +include 'google-account-plugin', 'core-plugin', 'common-lib', 'common-test-lib'