diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 00430c9..607fd33 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -28,6 +28,7 @@ jobs:
- sample_library
- cmake_layout
- no_default_profile_installed
+ - conanfile_dot_py
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f33e3ad..8899f6b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -72,7 +72,7 @@ jobs:
if: ${{ github.event.inputs.version_increment == 'true' }}
with:
commit_message: "Post release version increment to ${{ steps.postReleaseVersionIncrement.outputs.newVersion }} (from ${{ steps.postReleaseVersionIncrement.outputs.oldVersion }})"
- file_pattern: build.gradle.kts README.md tests/sample_library/build.gradle tests/cmake_layout/build.gradle tests/no_default_profile_installed/build.gradle
+ file_pattern: build.gradle.kts README.md tests/**/build.gradle
- run: echo -n > UpcomingReleaseNotes.md
if: ${{ github.event.inputs.github_release == 'true' }}
diff --git a/README.md b/README.md
index 9b5d7be..4398753 100644
--- a/README.md
+++ b/README.md
@@ -62,12 +62,15 @@ android {
### conanfile.txt
-ConanInstall task runs conan install on `conanfile.txt`. To use a different conanfile, e.g. `conanfile.py`, or one in a directory other than the module directory, configure tasks with it:
+Task `ConanInstall` runs `conan install .`, dot means current directory, which should contain `conanfile.txt` or `conanfile.py`.
+To use a different directory or a different conanfile, e.g. `backup-conanfile.txt`, configure `ConanInstall` tasks with it:
```groovy
["armv7", "armv8", "x86", "x86_64"].each { arch ->
tasks.named("conanInstall-" + arch) {
- conanfile.set("conanfile.py")
+ conanfile.set("subdir")
+ // or
+ conanfile.set("backup-conanfile.txt")
}
}
```
diff --git a/UpcomingReleaseNotes.md b/UpcomingReleaseNotes.md
index e69de29..c2017d2 100644
--- a/UpcomingReleaseNotes.md
+++ b/UpcomingReleaseNotes.md
@@ -0,0 +1 @@
+Call `conan install .` instead of `conan install conanfile.txt` by default. Conan can find conanfile.py on its own.
diff --git a/ci-scripts/incrementVersion.py b/ci-scripts/incrementVersion.py
index f675a63..46ed022 100755
--- a/ci-scripts/incrementVersion.py
+++ b/ci-scripts/incrementVersion.py
@@ -48,6 +48,10 @@ def main():
prefix=" id 'app.opendocument.conanandroidgradleplugin' version \"",
version=new_version,
suffix="\" apply false")
+ replace_version_in_file(root_dir / "tests" / "conanfile_dot_py" / "build.gradle",
+ prefix=" id 'app.opendocument.conanandroidgradleplugin' version \"",
+ version=new_version,
+ suffix="\" apply false")
if __name__ == "__main__":
diff --git a/src/main/kotlin/app/opendocument/ConanInstallTask.kt b/src/main/kotlin/app/opendocument/ConanInstallTask.kt
index ec6363a..8116641 100644
--- a/src/main/kotlin/app/opendocument/ConanInstallTask.kt
+++ b/src/main/kotlin/app/opendocument/ConanInstallTask.kt
@@ -46,7 +46,7 @@ abstract class ConanInstallTask : Exec() {
init {
profile.convention("default")
buildProfile.convention("default")
- conanfile.convention("conanfile.txt")
+ conanfile.convention(".")
}
@get:OutputDirectory
diff --git a/tests/clean.sh b/tests/clean.sh
index f1f2324..ea13b0b 100755
--- a/tests/clean.sh
+++ b/tests/clean.sh
@@ -17,3 +17,8 @@ rm -r $BASEDIR/no_default_profile_installed/.gradle
rm -r $BASEDIR/no_default_profile_installed/lib/build
rm -r $BASEDIR/no_default_profile_installed/lib/.cxx
rm -r $BASEDIR/no_default_profile_installed/lib/CMakeUserPresets.json
+
+rm -r $BASEDIR/conanfile_dot_py/.gradle
+rm -r $BASEDIR/conanfile_dot_py/lib/build
+rm -r $BASEDIR/conanfile_dot_py/lib/.cxx
+rm -r $BASEDIR/conanfile_dot_py/lib/CMakeUserPresets.json
diff --git a/tests/conanfile_dot_py/build.gradle b/tests/conanfile_dot_py/build.gradle
new file mode 100644
index 0000000..b0c7a35
--- /dev/null
+++ b/tests/conanfile_dot_py/build.gradle
@@ -0,0 +1,5 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+ id 'com.android.library' version '8.5.1' apply false
+ id 'app.opendocument.conanandroidgradleplugin' version "0.9.2" apply false
+}
diff --git a/tests/conanfile_dot_py/gradle.properties b/tests/conanfile_dot_py/gradle.properties
new file mode 100644
index 0000000..784a1d4
--- /dev/null
+++ b/tests/conanfile_dot_py/gradle.properties
@@ -0,0 +1,14 @@
+# 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=-Xmx1536m
+# 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
+android.useAndroidX=true
diff --git a/tests/conanfile_dot_py/gradle/wrapper/gradle-wrapper.jar b/tests/conanfile_dot_py/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..2c35211
Binary files /dev/null and b/tests/conanfile_dot_py/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/tests/conanfile_dot_py/gradle/wrapper/gradle-wrapper.properties b/tests/conanfile_dot_py/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..09523c0
--- /dev/null
+++ b/tests/conanfile_dot_py/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/tests/conanfile_dot_py/gradlew b/tests/conanfile_dot_py/gradlew
new file mode 100755
index 0000000..f5feea6
--- /dev/null
+++ b/tests/conanfile_dot_py/gradlew
@@ -0,0 +1,252 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# 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
+#
+# https://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.
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+##############################################################################
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
+done
+
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
+' "$PWD" ) || exit
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+ echo "$*"
+} >&2
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD=$JAVA_HOME/jre/sh/java
+ else
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD=java
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
+ fi
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
+ done
+fi
+
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/tests/conanfile_dot_py/gradlew.bat b/tests/conanfile_dot_py/gradlew.bat
new file mode 100644
index 0000000..9b42019
--- /dev/null
+++ b/tests/conanfile_dot_py/gradlew.bat
@@ -0,0 +1,94 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
+
+@if "%DEBUG%"=="" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if %ERRORLEVEL% equ 0 goto execute
+
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if %ERRORLEVEL% equ 0 goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/tests/conanfile_dot_py/lib/CMakeLists.txt b/tests/conanfile_dot_py/lib/CMakeLists.txt
new file mode 100644
index 0000000..534f16d
--- /dev/null
+++ b/tests/conanfile_dot_py/lib/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.6)
+set(CMAKE_BUILD_TYPE Release CACHE STRING "Build configuration (Debug, Release, RelWithDebInfo, MinSizeRel)")
+
+project(samplelib)
+
+find_package(ZLIB REQUIRED)
+
+add_library(zlibuser SHARED zlibuser.cpp)
+target_link_libraries(zlibuser ZLIB::ZLIB)
diff --git a/tests/conanfile_dot_py/lib/build.gradle b/tests/conanfile_dot_py/lib/build.gradle
new file mode 100644
index 0000000..c2c32b6
--- /dev/null
+++ b/tests/conanfile_dot_py/lib/build.gradle
@@ -0,0 +1,39 @@
+plugins {
+ id 'com.android.library'
+ id 'app.opendocument.conanandroidgradleplugin'
+}
+
+group = 'com.viliussutkus89'
+
+android {
+ namespace = "com.viliussutkus89.sample_library"
+ compileSdk 34
+ defaultConfig {
+ minSdkVersion 21
+ targetSdk 35
+
+ versionCode 1
+ versionName "1.0.0"
+
+ externalNativeBuild.cmake.arguments(
+ '-DANDROID_STL=c++_shared',
+ "-DCMAKE_TOOLCHAIN_FILE=build/conan/android_toolchain.cmake",
+ "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
+ )
+ }
+ ndkVersion "26.3.11579264"
+ externalNativeBuild.cmake.path "CMakeLists.txt"
+}
+
+tasks.named("clean") {
+ def dotCxxDir = layout.projectDirectory.dir(".cxx")
+ doFirst {
+ delete dotCxxDir
+ }
+}
+
+["armv7", "armv8", "x86", "x86_64"].each { arch ->
+ tasks.named("conanInstall-" + arch) {
+ profile.set("conanprofile.txt")
+ }
+}
diff --git a/tests/conanfile_dot_py/lib/conanfile.py b/tests/conanfile_dot_py/lib/conanfile.py
new file mode 100644
index 0000000..d9039b4
--- /dev/null
+++ b/tests/conanfile_dot_py/lib/conanfile.py
@@ -0,0 +1,11 @@
+from conan import ConanFile
+
+required_conan_version = ">=2.0.6"
+
+
+class DotPyConan(ConanFile):
+ settings = "os", "compiler", "build_type", "arch"
+ requires = "zlib/1.3.1"
+
+ generators = "CMakeToolchain", "CMakeDeps"
+
diff --git a/tests/conanfile_dot_py/lib/conanprofile.txt b/tests/conanfile_dot_py/lib/conanprofile.txt
new file mode 100644
index 0000000..63277e8
--- /dev/null
+++ b/tests/conanfile_dot_py/lib/conanprofile.txt
@@ -0,0 +1,14 @@
+{% set android_home = os.getenv("ANDROID_HOME") %}
+{% set ndk_version = "26.3.11579264" %}
+
+[settings]
+os=Android
+os.api_level=21
+build_type=RelWithDebInfo
+compiler=clang
+compiler.version=17
+compiler.cppstd=20
+compiler.libcxx=c++_shared
+
+[conf]
+tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}}
diff --git a/tests/conanfile_dot_py/lib/src/main/AndroidManifest.xml b/tests/conanfile_dot_py/lib/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..abefef0
--- /dev/null
+++ b/tests/conanfile_dot_py/lib/src/main/AndroidManifest.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/tests/conanfile_dot_py/lib/zlibuser.cpp b/tests/conanfile_dot_py/lib/zlibuser.cpp
new file mode 100644
index 0000000..2411ccb
--- /dev/null
+++ b/tests/conanfile_dot_py/lib/zlibuser.cpp
@@ -0,0 +1,35 @@
+// Sample zlib user taken from conan tutorial
+// https://docs.conan.io/2/tutorial/consuming_packages/build_simple_cmake_project.html
+
+#include
+#include
+#include
+
+#include
+
+int main_func(void) {
+ char buffer_in [256] = {"Conan is a MIT-licensed, Open Source package manager for C and C++ development "
+ "for C and C++ development, allowing development teams to easily and efficiently "
+ "manage their packages and dependencies across platforms and build systems."};
+ char buffer_out [256] = {0};
+
+ z_stream defstream;
+ defstream.zalloc = Z_NULL;
+ defstream.zfree = Z_NULL;
+ defstream.opaque = Z_NULL;
+ defstream.avail_in = (uInt) strlen(buffer_in);
+ defstream.next_in = (Bytef *) buffer_in;
+ defstream.avail_out = (uInt) sizeof(buffer_out);
+ defstream.next_out = (Bytef *) buffer_out;
+
+ deflateInit(&defstream, Z_BEST_COMPRESSION);
+ deflate(&defstream, Z_FINISH);
+ deflateEnd(&defstream);
+
+ printf("Uncompressed size is: %zu\n", strlen(buffer_in));
+ printf("Compressed size is: %zu\n", strlen(buffer_out));
+
+ printf("ZLIB VERSION: %s\n", zlibVersion());
+
+ return EXIT_SUCCESS;
+}
diff --git a/tests/conanfile_dot_py/settings.gradle b/tests/conanfile_dot_py/settings.gradle
new file mode 100644
index 0000000..cbc2d00
--- /dev/null
+++ b/tests/conanfile_dot_py/settings.gradle
@@ -0,0 +1,18 @@
+pluginManagement {
+ repositories {
+ mavenLocal()
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+include ':lib'
+rootProject.name = 'conanfile_dot_py'
diff --git a/tests/run_all.sh b/tests/run_all.sh
index 54311f0..c516816 100755
--- a/tests/run_all.sh
+++ b/tests/run_all.sh
@@ -12,3 +12,6 @@ cd $BASEDIR/cmake_layout
cd $BASEDIR/no_default_profile_installed
./gradlew assemble
+
+cd $BASEDIR/conanfile_dot_py
+./gradlew assemble