make idea work nicely after importing from gradle

This commit is contained in:
Anton Keks 2018-12-22 22:35:50 +02:00
parent e3faf5cd37
commit 4571638397
13 changed files with 47 additions and 106 deletions

2
.idea/compiler.xml generated
View File

@ -6,6 +6,8 @@
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="true">
<sourceOutputDir name="build/generated/source/apt" />
<sourceTestOutputDir name="build/generated/test/apt" />
<outputRelativeToContentRoot value="true" />
</profile>
</annotationProcessing>

View File

@ -1,15 +0,0 @@
<component name="libraryTable">
<library name="lib_common">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/javax.inject-1.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/dagger-2.8.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/build/dagger-compiler-2.8.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/build/dagger-producers-2.8.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/build/guava-20.0-rc1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/swt-src.zip!/" />
</SOURCES>
</library>
</component>

View File

@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="lib_linux">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/swt-linux.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jna.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="lib_linux64">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/swt-linux64.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jna.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="lib_mac">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/jna.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/swt-mac.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="lib_testing">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/testing" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/lib/testing" recursive="false" />
</library>
</component>

View File

@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="lib_win32">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/jna-win32.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/swt-win32.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="lib_win64">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/swt-win64.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jna-win64.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

2
.idea/misc.xml generated
View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@ -1,19 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Main" type="Application" factoryName="Application" singleton="true">
<extension name="coverage" enabled="false" merge="false" runner="idea" />
<option name="MAIN_CLASS_NAME" value="net.azib.ipscan.Main" />
<option name="VM_PARAMETERS" value="-Djava.util.logging.config.file=config/logging.properties" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$MODULE_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="ipscan" />
<envs>
<env name="SWT_GTK3" value="0" />
</envs>
<option name="INCLUDE_PROVIDED_SCOPE" value="true" />
<option name="MAIN_CLASS_NAME" value="net.azib.ipscan.Main" />
<module name="ipscan" />
<option name="VM_PARAMETERS" value="-Djava.util.logging.config.file=config/logging.properties" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
@ -22,6 +16,8 @@
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>

View File

@ -5,9 +5,6 @@ This is the source code of Angry IP Scanner, licensed with GPL v2. [Official sit
The code is written mostly in Java (currently, source level 1.7).
IntelliJ IDEA is recommended for coding (Community Edition is fine).
**Important:** after loading the project in IDEA, make sure you select the appropriate for your platform **lib_xxx library in module dependencies**
*(File -> Project Structure -> Modules -> ipscan -> Dependencies - move the correct lib_xxx to the top)*.
## Building [![Build Status](https://travis-ci.org/angryip/ipscan.svg?branch=master)](https://travis-ci.org/angryip/ipscan)
Using these tools you can build on any platform. The binaries are in the form of

View File

@ -3,6 +3,7 @@ plugins {
}
apply plugin: 'java'
apply plugin: 'idea'
version = '3.5.3'
sourceCompatibility = 1.7
@ -10,7 +11,7 @@ targetCompatibility = 1.7
sourceSets {
main {
java { srcDirs "src", "ext/rocksaw/src", "ext/vserv-tcpip/src/java" }
java { srcDirs "src", "ext/rocksaw/src", "ext/vserv-tcpip/src/java", "build/generated/source/apt/main" }
resources { srcDirs "config", "src", "resources" }
}
test {
@ -19,18 +20,27 @@ sourceSets {
}
}
idea {
module {
generatedSourceDirs += file("build/generated/source/apt/main")
}
}
repositories {
jcenter()
}
dependencies {
compile 'com.google.dagger:dagger:2.19'
compileOnly files('lib/swt-win32.jar')
compileOnly files('lib/swt-linux64.jar')
compileOnly files('lib/jna.jar')
apt 'com.google.dagger:dagger-compiler:2.19'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.23.0'
testCompile files('lib/swt-linux64.jar')
}
configurations {
testImplementation.extendsFrom compileOnly
}
def packageTask(def platform, def moreJars, def moreLibs, Closure doMore) {

View File

@ -9,11 +9,18 @@
<sourceFolder url="file://$MODULE_DIR$/ext/vserv-tcpip/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/main" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/config" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/generated_tests" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/resources" />
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
<excludeFolder url="file://$MODULE_DIR$/out" />
<excludeFolder url="file://$MODULE_DIR$/test-coverage" />
<excludeFolder url="file://$MODULE_DIR$/test-results" />
@ -22,10 +29,23 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: com.google.dagger:dagger:2.19" level="project" />
<orderEntry type="library" name="Gradle: javax.inject:javax.inject:1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.dagger:dagger-compiler:2.19" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.dagger:dagger-spi:2.19" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.dagger:dagger-producers:2.19" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.googlejavaformat:google-java-format:1.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.guava:guava:25.0-jre" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.squareup:javapoet:1.11.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: javax.annotation:jsr250-api:1.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.checkerframework:checker-compat-qual:2.5.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.errorprone:javac-shaded:9-dev-r4023-3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.code.findbugs:jsr305:1.3.9" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.errorprone:error_prone_annotations:2.1.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.google.j2objc:j2objc-annotations:1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
<orderEntry type="module-library" scope="PROVIDED">
<library name="Gradle: swt-win32">
<library name="Gradle: swt-linux64">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/swt-win32.jar!/" />
<root url="jar://$MODULE_DIR$/lib/swt-linux64.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@ -46,14 +66,5 @@
<orderEntry type="library" scope="TEST" name="Gradle: net.bytebuddy:byte-buddy:1.9.0" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: net.bytebuddy:byte-buddy-agent:1.9.0" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="module-library" scope="TEST">
<library name="Gradle: swt-linux64">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/swt-linux64.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>