Skip to content

Commit 64c2646

Browse files
Call conan install . instead of conan install conanfile.txt by default. Conan can find conanfile.py on its own
1 parent 8c0e602 commit 64c2646

21 files changed

Lines changed: 524 additions & 4 deletions

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- sample_library
2929
- cmake_layout
3030
- no_default_profile_installed
31+
- conanfile_dot_py
3132
steps:
3233
- uses: actions/checkout@v4
3334
- uses: actions/setup-java@v4

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
if: ${{ github.event.inputs.version_increment == 'true' }}
7373
with:
7474
commit_message: "Post release version increment to ${{ steps.postReleaseVersionIncrement.outputs.newVersion }} (from ${{ steps.postReleaseVersionIncrement.outputs.oldVersion }})"
75-
file_pattern: build.gradle.kts README.md tests/sample_library/build.gradle tests/cmake_layout/build.gradle tests/no_default_profile_installed/build.gradle
75+
file_pattern: build.gradle.kts README.md tests/**/build.gradle
7676

7777
- run: echo -n > UpcomingReleaseNotes.md
7878
if: ${{ github.event.inputs.github_release == 'true' }}

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,15 @@ android {
6262

6363
### conanfile.txt
6464

65-
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:
65+
Task `ConanInstall` runs `conan install .`, dot means current directory, which should contain `conanfile.txt` or `conanfile.py`.
66+
To use a different directory or a different conanfile, e.g. `backup-conanfile.txt`, configure `ConanInstall` tasks with it:
6667

6768
```groovy
6869
["armv7", "armv8", "x86", "x86_64"].each { arch ->
6970
tasks.named("conanInstall-" + arch) {
70-
conanfile.set("conanfile.py")
71+
conanfile.set("subdir")
72+
// or
73+
conanfile.set("backup-conanfile.txt")
7174
}
7275
}
7376
```

UpcomingReleaseNotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Call `conan install .` instead of `conan install conanfile.txt` by default. Conan can find conanfile.py on its own.

ci-scripts/incrementVersion.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def main():
4848
prefix=" id 'app.opendocument.conanandroidgradleplugin' version \"",
4949
version=new_version,
5050
suffix="\" apply false")
51+
replace_version_in_file(root_dir / "tests" / "conanfile_dot_py" / "build.gradle",
52+
prefix=" id 'app.opendocument.conanandroidgradleplugin' version \"",
53+
version=new_version,
54+
suffix="\" apply false")
5155

5256

5357
if __name__ == "__main__":

src/main/kotlin/app/opendocument/ConanInstallTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ abstract class ConanInstallTask : Exec() {
4646
init {
4747
profile.convention("default")
4848
buildProfile.convention("default")
49-
conanfile.convention("conanfile.txt")
49+
conanfile.convention(".")
5050
}
5151

5252
@get:OutputDirectory

tests/clean.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ rm -r $BASEDIR/no_default_profile_installed/.gradle
1717
rm -r $BASEDIR/no_default_profile_installed/lib/build
1818
rm -r $BASEDIR/no_default_profile_installed/lib/.cxx
1919
rm -r $BASEDIR/no_default_profile_installed/lib/CMakeUserPresets.json
20+
21+
rm -r $BASEDIR/conanfile_dot_py/.gradle
22+
rm -r $BASEDIR/conanfile_dot_py/lib/build
23+
rm -r $BASEDIR/conanfile_dot_py/lib/.cxx
24+
rm -r $BASEDIR/conanfile_dot_py/lib/CMakeUserPresets.json
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
plugins {
3+
id 'com.android.library' version '8.5.1' apply false
4+
id 'app.opendocument.conanandroidgradleplugin' version "0.9.2" apply false
5+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx1536m
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. More details, visit
12+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13+
# org.gradle.parallel=true
14+
android.useAndroidX=true
42.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)