Jestem nowy z projektami Gradle i mam jedno pytanie. Szukałem w Internecie, ale nie mogłem znaleźć tego, czego potrzebuję, a może nie mogłem go znaleźć. Najpierw powiem ci moją sprawę. Mam projekt Gradle i chciałbym przeprowadzić kilka automatycznych testów, w przyszłości z Jennkins, ale teraz chcę spróbować na Eclipse. mam wyroczni sterownik JDBC w katalogu/lib, a to jest mój build.gradleJak używać sterownika Oracle JDBC w projekcie Gradle
apply plugin: 'java'
// In this section you declare where to find the dependencies of your project
repositories {
jcenter()
//mavenCentral()
}
// In this section you declare the dependencies for your production and test code
dependencies {
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'org.seleniumhq.selenium:selenium-java:2.+'
compile 'org.testng:testng:6.+'
//compile 'com.oracle:ojdbc14:10.2.0.4.0'
//testCompile 'net.sourceforge.jexcelapi:jxl:2.6.12'
testCompile 'info.cukes:cucumber-core:1.+'
testCompile 'info.cukes:cucumber-java:1.+'
testCompile 'info.cukes:cucumber-junit:1.+'
testCompile 'junit:junit:4.12'
}
repositories {
flatDir(dir: 'libs')//, name: 'Local libs'
}
dependencies {
compile name: 'ojdbc7'
}
Chciałbym użyć tego sterownika JDBC w jednej klasie, ale nie wiem, jak go używać. Kiedy próbowałem z Mavenem, użyłem w ten sposób "import oracle.jdbc.driver.OracleDriver;" ale myślę, że to nie jest ważne dla projektu Gradle. Czy możesz mi pomóc, proszę? Dzięki z góry
Nie chcę używać maven, jest W pewnym sensie tylko gradle robi to samo. –