166 lines
4.0 KiB
Groovy
166 lines
4.0 KiB
Groovy
import java.util.concurrent.atomic.AtomicBoolean
|
|
import java.util.concurrent.locks.ReentrantLock
|
|
|
|
buildscript {
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:9.5.1'
|
|
classpath 'com.google.android.gms:oss-licenses-plugin:0.13.0'
|
|
classpath 'org.handte.gradle:gradle-android-eclipse:1.0.0'
|
|
classpath "org.openbakery:xcode-plugin:0.24.+"
|
|
}
|
|
repositories {
|
|
maven {
|
|
url('https://openbakery.org/repository/')
|
|
}
|
|
maven {
|
|
url = 'https://project.nes.uni-due.de/nexus/repository/maven-public';
|
|
credentials { username = 'public'; password = 'public' }
|
|
authentication { basic(BasicAuthentication) }
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
allprojects {
|
|
// set version for our project
|
|
group = 'com.mowesta'
|
|
version = '1.1.3-SNAPSHOT'
|
|
|
|
// set versions for our libraries
|
|
ext {
|
|
// api dependencies
|
|
versionJavaee = '10.0.0'
|
|
versionJaxb = '4.0.5'
|
|
versionAnnotation = '1.3.2'
|
|
versionSwagger = '2.2.16'
|
|
versionGeojson = '1.8.1'
|
|
// wildfly dependencies, keep in sync
|
|
versionJackson = '2.14.3'
|
|
versionResteasy = '6.2.7.Final'
|
|
versionWildfly = '31.0.1.Final'
|
|
versionHibernate = '6.4.4.Final'
|
|
versionHibernateSearch = '7.0.0.Final'
|
|
versionLucene = '9.8.0'
|
|
// other frameworks and libraries
|
|
versionGalleon = '5.2.2.Final'
|
|
versionMapDB = '3.1.0'
|
|
versionCommonsNet = '3.5'
|
|
versionCommonsCompress = '1.20'
|
|
versionJunit = '4.13.2'
|
|
versionArquillianContainer = '5.0.1.Final'
|
|
versionArquillianJunit = '1.8.0.Final'
|
|
versionArquillianProtocol = '1.7.2.Final'
|
|
versionPostgres = '42.7.1'
|
|
versionMapstruct = '1.5.5.Final'
|
|
// shared android dependencies
|
|
versionAndroidXTest = '1.7.0'
|
|
versionAndroidXAppcompat = '1.8.0'
|
|
versionAndroidXRoom = '2.6.1'
|
|
versionAndroidXPreference = '1.2.1'
|
|
versionRobolectric = '4.14.1'
|
|
// locoslab libraries and code
|
|
versionGeometry = '1.4.0'
|
|
versionCarta = '1.3.0'
|
|
versionGrib2 = '1.0.2'
|
|
versionAuth = '1.1.0'
|
|
// tools
|
|
versionCli = '1.4'
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'maven-publish'
|
|
apply plugin: 'eclipse'
|
|
|
|
plugins.withType(JavaPlugin) {
|
|
afterEvaluate {
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if (name.equals('android-app')) {
|
|
// custom apk configuration
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
groupId = 'com.mowesta'
|
|
version = project.version
|
|
artifact file('build/outputs/apk/prod/release/android-app-prod-release.apk')
|
|
}
|
|
}
|
|
}
|
|
} else if (name.equals('android-sdk')) {
|
|
// custom aar configuration
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
groupId = 'com.mowesta'
|
|
artifact file('build/outputs/aar/android-sdk-release.aar')
|
|
version = project.version
|
|
}
|
|
}
|
|
}
|
|
} else if (name.startsWith('ios-')) {
|
|
// custom ios configuration
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
artifact file('build.gradle')
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
// standard java configration
|
|
apply plugin: 'java-library'
|
|
|
|
task sourcesJar(type: Jar) {
|
|
archiveClassifier = 'sources'
|
|
from(sourceSets.main.allJava)
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
from(components.java)
|
|
artifact(sourcesJar)
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url = 'https://project.nes.uni-due.de/nexus/repository/maven-public';
|
|
credentials { username = 'public'; password = 'public' }
|
|
authentication { basic(BasicAuthentication) }
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
url = version.endsWith('SNAPSHOT') ?
|
|
"https://project.nes.uni-due.de/nexus/repository/maven-snapshots" :
|
|
"https://project.nes.uni-due.de/nexus/repository/maven-releases"
|
|
credentials { username = 'jenkins'; password = System.properties['jenkins.nexus.password'] }
|
|
authentication { basic(BasicAuthentication) }
|
|
}
|
|
}
|
|
}
|
|
|
|
// rename subprojects in eclipse to avoid collisions with other projects
|
|
eclipse.project.name = 'mowesta-' + project.name
|
|
}
|
|
|
|
|