diff --git a/app/build.gradle b/app/build.gradle index 856fed6..5282de6 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,25 +1,13 @@ apply plugin: 'com.android.application' -buildscript { - dependencies { - classpath 'com.android.tools.build:gradle:4.2.0' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } - repositories { - jcenter() - google() - } -} - android { - compileSdkVersion 29 - buildToolsVersion '30.0.2' + compileSdk 30 + namespace "ro.polak.webserver.webserver" + defaultConfig { applicationId "ro.polak.webserver" - minSdkVersion 19 - targetSdkVersion 29 + minSdk 19 + targetSdk 29 versionCode 1 versionName "1.0" } @@ -28,6 +16,12 @@ android { minifyEnabled false } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + productFlavors { } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 83ea520..e4c984e 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/base/build.gradle b/base/build.gradle index ad91449..9d22323 100644 --- a/base/build.gradle +++ b/base/build.gradle @@ -1,24 +1,12 @@ apply plugin: 'com.android.library' -buildscript { - dependencies { - classpath 'com.android.tools.build:gradle:4.2.0' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } - repositories { - jcenter() - google() - } -} - android { - compileSdkVersion 29 - buildToolsVersion '30.0.2' + compileSdk 30 + namespace "ro.polak.webserver.base" + defaultConfig { - minSdkVersion 19 - targetSdkVersion 29 + minSdk 19 + targetSdk 29 versionCode 1 versionName "1.0" } @@ -27,6 +15,12 @@ android { minifyEnabled false } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + productFlavors { } } diff --git a/base/src/main/AndroidManifest.xml b/base/src/main/AndroidManifest.xml index 066da0b..22f4fc3 100644 --- a/base/src/main/AndroidManifest.xml +++ b/base/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/build.gradle b/build.gradle index ff927bb..93d7162 100755 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,19 @@ -allprojects { - repositories { - jcenter() - google() +buildscript { + dependencies { + classpath 'com.android.tools.build:gradle:7.3.1' // Use the latest version } +} + +plugins { + id 'com.android.application' version '8.8.0' apply false + id 'com.android.library' version '8.8.0' apply false +} + +task clean(type: Delete) { + delete rootProject.buildDir +} + +allprojects { apply plugin: 'checkstyle' checkstyle { toolVersion = "8.12" @@ -13,13 +24,6 @@ allprojects { } tasks.withType(JavaCompile) { options.deprecation = true - options.compilerArgs += ['-Werror'] - } -} - -buildscript { - repositories { - jcenter() - google() + // options.compilerArgs += ['-Werror'] } } \ No newline at end of file diff --git a/cli/build.gradle b/cli/build.gradle index c8043ca..223b090 100644 --- a/cli/build.gradle +++ b/cli/build.gradle @@ -2,11 +2,11 @@ apply plugin: 'java' apply plugin: 'eclipse' compileJava { - sourceCompatibility = 1.7 + sourceCompatibility = 17 } compileTestJava { - sourceCompatibility = 1.8 + sourceCompatibility = 17 } jar { @@ -20,7 +20,7 @@ task fatJar(type: Jar) { attributes 'Implementation-Title': 'StandaloneHTTP server', 'Main-Class': 'ro.polak.http.cli.DefaultCliServerGui' } - baseName = project.name + '-all' + // baseName = project.name + '-all' from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } with jar } diff --git a/gradle.properties b/gradle.properties index 37eea34..396c0fe 100755 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,25 @@ # Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx4608m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a2..1656405 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Sat Sep 03 12:28:27 TRT 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME \ No newline at end of file diff --git a/http/build.gradle b/http/build.gradle index 5416af9..6d42b64 100644 --- a/http/build.gradle +++ b/http/build.gradle @@ -3,17 +3,14 @@ apply plugin: 'jacoco' apply plugin: 'info.solidsoft.pitest' compileJava { - sourceCompatibility = 1.7 + sourceCompatibility = 17 } compileTestJava { - sourceCompatibility = 1.8 + sourceCompatibility = 17 } // Added here to enable http subproject to be built without the root project -repositories { - jcenter() -} buildscript { repositories { @@ -37,8 +34,8 @@ dependencies { jacocoTestReport { reports { - xml.enabled = true - html.enabled = true + // xml.enabled = true + // html.enabled = true } afterEvaluate { getClassDirectories().setFrom(files(classDirectories.files.collect { diff --git a/settings.gradle b/settings.gradle index fc8b93c..11c15eb 100755 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,21 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + jcenter() + maven { url 'https://jitpack.io' } + mavenCentral() + } +} + +rootProject.name = "AHTTP-SERVER" include ':cli', ':http' if (!settings.hasProperty("skipAndroidBuild")) {